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

Non-serde DMA support on little endian #41

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

vlovich
Copy link
Contributor

@vlovich vlovich commented Mar 14, 2024

Expose a way to retrieve the underlying contents of the Mphf as a series of scattered slices which can then be written to disk efficiently.

Create a new MphfRef struct that can be used to take in aligned scattered slices to cheaply construct a queriable interface without copying the underlying data. This is useful for 0-copy construction when accessing the underlying disk blocks as mmap.

This is just 1 commit that builds off #40

vlovich added 3 commits April 5, 2024 19:45
This is ~10% faster for u64 lookups. For lookups and construction the
time is constant regardless of the true length of the input (assuming
you can amortize the hashing cost somehow externally to this library).

For example, for a 128 byte string construction is ~2.5x faster and
lookups are ~1.7x faster.
Latest rayon requires at least Rust 1.63, regex requires 1.65, and
std::hint::black_box was stabilized in 1.66, so bump that.

Also bump the current stable version to validate with a newer Rust since
presumably that's the intention of the second version.
Introduce a mechanism to convert Mphf into a series of slices and
MphfRef which can take a series of slices as input and access it without
copying the underlying data. This is useful when serializing to disk and
then accessing via mmap but does have caveats that it's restricted to
little-endian systems and that the data is stored on 64-bit aligned
addresses within a file.
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