Skip to content

Add the shared HAMT bitmap core - #446

Draft
helly25 wants to merge 2 commits into
feature/segmented-sequence-rangesfrom
feature/hamt-bitmap-core
Draft

Add the shared HAMT bitmap core#446
helly25 wants to merge 2 commits into
feature/segmented-sequence-rangesfrom
feature/hamt-bitmap-core

Conversation

@helly25

@helly25 helly25 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Introduce the constexpr occupancy-and-rank primitive shared by the planned HAMT map/set and flat/node layouts. It supports every 4- through 7-bit fragment width selected for later benchmarking, including the two-word 7-bit representation.

AG;DR

  • adds one shared internal bitmap implementation rather than multiplying map/set or flat/node cores
  • supports membership, dense child rank, insertion, erasure, and population count
  • handles 16-, 32-, 64-, and 128-slot nodes
  • exhaustively tests every slot at every candidate fragment width
  • verifies constant-evaluation support
  • follows the internal PascalCase API convention and uses bounds-checked array access required by repository clang-tidy policy

Validation:

  • bazel test //mbo/container:hamt_bitmap_test
  • focused pre-commit passed with local clang-tidy and the sandbox-incompatible trunk wrapper explicitly skipped; clang-format passed

This is a chained draft based on PR #445 and must not merge before its predecessors. It is an internal complete primitive, not a prematurely exposed partial HAMT container.

@helly25
helly25 force-pushed the feature/hamt-bitmap-core branch from d19d92e to f531523 Compare September 11, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant