Optimizing grouping, and moving away from splitting
So, while Sawzall provides split-with, it is almost inherently going to be slow, due to the amount of copying involved.
The new way (a data-frame with a bunch of intervals) of representing a grouped data-frame is much faster, as it does very little copying. However, it spends a lot of time in vector-reorder!, and it calls vector-sort! more than it probably needs to. One approach is to not actually sort the data-frame, and instead store the index vector as part of the metadata stored along with groups.
In addition, some operations still need splitting. Namely, all of the combining joins (left-join, inner-join, ...) use splitting to retain ordering. This can probably be fixed by making these operations take a similar strategy to grouping.
The above commit moves joins away from splitting. Pivoting still needs to be moved away from splitting, and optimizing grouping still has to be done.
Pivoting is probably harder to switch over. We'll see.