Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensible/Linear hashing paged tree #46

Open
1 task done
spmadden opened this issue Dec 18, 2023 · 0 comments
Open
1 task done

Extensible/Linear hashing paged tree #46

spmadden opened this issue Dec 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@spmadden
Copy link
Owner

Is there an existing request for this?

  • I have searched existing issues

Statement of Objective

Need fast ability to store millions of keyed/hashed items. Think git repo objects.

Proposed Solution

Retrieving: Given a hash like [u8;20], walk through the hash in standard iteration order byte-by-byte. Each byte is the key into a level. If that level is an inner level, iterate to the next byte and move down a level. If that level is a leaf level, loop through all 256 values to find the correct value. Compare the full hash to verify it's the correct item.

Adding: Same process as retrieving. If you hit a leaf and the bucket is already full, convert the leaf into a inner, and copy the values down one level further. It's splitting the leaf bucket into 256 sub-buckets.

Inspirations: sqlite file format, but less complex.

Alternatives

No response

Additional context

No response

@spmadden spmadden added the enhancement New feature or request label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant