Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. bitmap

bitmap

MITAssemblyv1.5.5

A high-performance SIMD-vectorized bitmap index implementation in Go for dense small-to-medium collections.

GitHubGitHub
382 stars33 forks0 contributors

What is bitmap?

kelindar/bitmap is a Go library implementing a dense bitmap (bitset) with SIMD-vectorized operations. It provides high-performance boolean algebra, bit counting, and iteration for building bitmap indexes and managing dense collections. The library is optimized for zero heap allocations and leverages modern CPU instructions for speed.

Target Audience

Go developers building columnar in-memory stores, database indexing systems, or performance-critical applications requiring dense bitmap operations. It's particularly useful for those implementing bitmap indexes as an alternative to B-trees or hash maps.

Value Proposition

Developers choose kelindar/bitmap for its exceptional performance in dense bitmap scenarios, featuring SIMD acceleration, zero allocations, and a simple API. It outperforms sparse-focused alternatives like Roaring Bitmaps for small-to-medium dense datasets and integrates seamlessly into indexing systems.

Overview

Simple dense bitmap index in Go with binary operators

Use Cases

Best For

  • Implementing bitmap indexes for columnar in-memory databases
  • Building high-performance free-list or allocation bitmaps
  • Accelerating boolean operations on dense bit sets with SIMD
  • Creating custom filtering systems with in-place bitmap operations
  • Developing search engines requiring fast intersection/union of result sets
  • Optimizing Go applications that need zero-allocation bit manipulation

Not Ideal For

  • Applications dealing with extremely sparse bitmaps (e.g., where less than 1% of bits are set), where sparse-focused libraries like Roaring Bitmaps would be more memory-efficient.
  • Projects requiring cross-platform deployment on architectures without SIMD support, as the vectorized optimizations are hardware-specific and may not run on all CPUs.
  • Use cases needing built-in bitmap compression or advanced persistence mechanisms, as the library focuses on in-memory performance with only basic binary serialization.

Pros & Cons

Pros

SIMD-Optimized Speed

Uses vectorized instructions for boolean algebra operations, achieving nanosecond-level performance in benchmarks for And, Or, etc., as shown with times like 141.7 ns/op for OR on 100,000 elements.

Zero Allocation Design

All critical methods avoid heap allocations entirely, evidenced by benchmark results showing 0 B/op across operations, reducing garbage collector overhead in performance-critical applications.

Efficient Boolean Operations

Provides hardware-accelerated AND, OR, XOR, and ANDNOT, making it ideal for implementing bitmap indexes as demonstrated in the documentation with book filtering examples.

Fast Iteration and Filtering

Includes Range() and Filter() methods with minimal overhead, optimized for in-place operations without extra allocations, as benchmarked with Filter() at 93,630 ns/op for 100,000 elements.

Cons

Density Limitation

Explicitly designed for dense small or medium bitmaps; performance and memory usage degrade for sparse data, and the README admits it's not suitable compared to Roaring Bitmaps for sparse cases.

Basic Serialization

Offers binary encoding with no-copy slice conversion but lacks advanced features like compression or built-in support for persistent storage, limiting use in scenarios requiring efficient disk I/O.

Assembly Dependency

Relies on SIMD assembly code for optimizations, which can complicate porting to non-x86 platforms or debugging, and may not be available in all deployment environments.

Frequently Asked Questions

Quick Stats

Stars382
Forks33
Contributors0
Open Issues12
Last commit6 months ago
CreatedSince 2021

Tags

#bitmap#high-performance#simd#columnar-store#go-library#data-structures#index#bitset#in-memory-indexing

Built With

G
Go
S
SIMD
a
assembly

Included in

Go169.1k
Auto-fetched 10 hours ago

Related Projects

bitsetbitset

Go package implementing bitsets

Stars1,513
Forks191
Last commit4 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub