Python, Erlang, Map/Reduce
This is what I found to be fastest, beating Ruby by a full second on my test data; actually a list comprehension was slightly faster but at increased resource use. Oddly, ruby is penalized for using F.L.'s filter optimization - almost twice as slow.
counts = defaultdict(int) for match in (res.group(1) for res in (ongoing_re.search(line) for line in open(sys.argv[1]) if "GET /ongoing/When" in line) if res): counts[match] +=1Posted by Michael Watkins