Skip to content

Reduce object allocations of CompensatedSum in aggregations #49506

@talevy

Description

@talevy

#48558 introduced a CompensatedSum helper class to reduce duplicate code in aggregations that computed kahan summations for things like centroid, and average calculations. It definitely consolidated this code, but also resulted in multiple creations of these objects that can be avoided.

Possible solution:

A lot of the use-cases of CompensatedSum work off values from DoubleArrays, so maybe it is worth exploring a dedicated DoubleArray that has the kahan-summation logic baked into it. That way the calculation can be consolidated and in-line with no object allocations.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions