add hashmap - #2
Open
mallang wants to merge 80 commits into
Open
Conversation
python test code for hash index
fix cargo clippy and fix test cases
rotaki
added a commit
that referenced
this pull request
Apr 23, 2026
This commit contains three critical fixes for order-preserving hash (ophash) support: 1. Fix overflow table bucket mismatch (Bug #1) - Added insert_at_bucket() method to OverflowTable - Updated PT to explicitly insert pages at their preferred bucket - Previously, ophash pages were inserted using default hash but looked up using preferred_frame hash, causing 99.9% page faults 2. Fix fastmod underflow for small values (Bug #2) - Changed ophash path from fastmod() to regular % modulo - fastmod returns 0 for all values <2^55, breaking sequential mapping - Affects both PT implementation and pt_preferred_slot utility function - This preserves order-preserving property: adjacent pages → adjacent slots 3. Add multi-container support to collision benchmark - Added --num-containers CLI argument to pt_fastpath_coverage - Distribute pages across multiple containers to create ophash collisions - Single-container ophash has perfect sequential mapping (no collisions) - Multi-container creates overlapping slot ranges → realistic collision testing Results after fixes: - Single container: 100% coverage (perfect alignment) - Multi-container (10+): ~50-100% coverage depending on collision width - Collision benchmark now works for ophash variants (previously crashed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.