deephaven / deephaven-core

Deephaven Community Core
Other
257 stars 80 forks source link

feat: add additional counting aggregations to `AggBy` #6358

Open lbooker42 opened 1 week ago

lbooker42 commented 1 week ago

New aggregations are:

lbooker42 commented 1 day ago

Note on extensive use of lambda and performance

I ran repeated tests on 4 different VM (arm64 on Mac M1) and verified that the lambda-heavy ops are not penalized and the lambda are (apparently) in-lined by the JIT.

The comparison is with AggSum that uses type-specialized operators but evaluates every value, AggCountNonNull that uses lambdas and evaluates every value, and AggCountAll (which aliases AggCount) that evaluates no values, simply returning the size of the bucket rowset.

image

The expected (and confirmed) result is that the new counting ops will fall between AggSum and AggCountAll/AggCount in performance.