Bitmap Versions Save

Simple dense bitmap index in Go with binary operators

v1.5.2

6 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.5.1...v1.5.2

v1.5.1

10 months ago

What's Changed

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.5.0...v1.5.1

v1.5.0

1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.4.1...v1.5.0

v1.4.1

1 year ago

What's Changed

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.4.0...v1.4.1

v1.4.0

1 year ago

This release 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.

What's Changed

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.3.0...v1.4.0

v1.3.0

1 year ago

This release adds a vectorized population count implementation, described in the paper https://arxiv.org/pdf/1611.07612.pdf by W. Mula, N. Kurz and D. Lemire. The code itself is borrowed from https://github.com/viant/vec/tree/main/bits with few alteration and a toolchain, I have it working for amd64 but haven't implemented for arm64 yet.

This results in a 50% improvement of performance for Count() operation and is especially useful for large bitmaps.

What's Changed

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.2.2...v1.3.0

v1.2.2

1 year ago

What's Changed

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.2.1...v1.2.2

v1.2.1

2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.2.0...v1.2.1

v1.2.0

2 years ago

This release adds optimized code to perform And, And Not, Or and Xor operations on multiple bitmaps at once. The signature hence now adds a variadic parameter for extra bitmaps, as shown below.

func (*Bitmap) And(other Bitmap, extra ...Bitmap)
cpu: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
BenchmarkMany/and4-naive-8         	  100153	     12324 ns/op	       0 B/op	       0 allocs/op
BenchmarkMany/and4-many-8          	  139195	      8709 ns/op	       0 B/op	       0 allocs/op

The main difference is that SIMD code generated now performs multiple of these instructions at once, allowing us to make better use of the cached destination bitmap. Below are the comparison results between naive version which calls And() 4 times and the batched version which calls And() with 1 other bitmap and 3 extra.

image

image

image

What's Changed

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.1.5...v1.2.0

v1.1.5

2 years ago

Instead of simply using next power of 2 to resize bitmaps, now after 256 elements we will use a formula that is similar to one used during slice append, which increases the slice gradually 25% at a time, saving space.

What's Changed

Full Changelog: https://github.com/kelindar/bitmap/compare/v1.1.4...v1.1.5