gggeom icon indicating copy to clipboard operation
gggeom copied to clipboard

Alternative implementation of do

Open hadley opened this issue 9 years ago • 1 comments

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.

hadley avatar Oct 22 '14 19:10 hadley