kelindar / bitmap

Simple dense bitmap index in Go with binary operators
MIT License
306 stars 23 forks source link

Add filtered reduction functions #28

Closed kelindar closed 2 years ago

kelindar commented 2 years ago

This PR adds simple generic functions for filtered reduction specifically Sum([]T, Bitmap), Min([]T, Bitmap) and Max([]T, Bitmap). They are not the most optimized at the moment, but should be at least 2x better than the naive implementations using range or loop, as these reductions are done in a vectorized way.