Non-serde DMA support on little endian - #41
Open
vlovich wants to merge 5 commits into
Open
Conversation
vlovich
force-pushed
the
dma
branch
3 times, most recently
from
March 15, 2024 03:25
b207f61 to
da9db22
Compare
vlovich
force-pushed
the
dma
branch
2 times, most recently
from
April 6, 2024 02:45
80e2767 to
b2f1f63
Compare
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.
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.
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