gggeom
gggeom copied to clipboard
Alternative implementation of do
compute_bin()
functions must be type stable, so we might be able to improve performance by growing the data frame and inserting in place. This will only affect performance for large numbers of groups, since otherwise I'd expect the bottleneck to be in the within-group computation.
Alternatively, it might be better to rethink from scratch with a more-cache sensitive approach - i.e. each group gets an integer id, so problem becomes the same as 2d binning. Can process x in a single pass, keeping per-bin info in L2.