liebke/incanter — pull request #173 by morrifeldman (2013-08-15 18:19:08+00:00)
Title: Use Clojure's "group-by" in $group-by for speed

Change $group-by so that it uses the builtin group-by function and add
tests for $group-by. Now substantially faster for some datasets.

I really like $group-by for my data analysis, but when I used it with large data sets it was taking forever. After switching the code to use the built-in version of group-by, it runs much faster. For instance, making ~150 groups from ~100k rows used to take ~25 secs and now it takes ~400msecs. I tested it with the examples in the doc string for $group-by and it returns the same answer as before. Please let me know if you have any concerns.