Skip to content

Non-serde DMA support on little endian - #41

Open
vlovich wants to merge 5 commits into
10XGenomics:masterfrom
vlovich:dma
Open

Non-serde DMA support on little endian#41
vlovich wants to merge 5 commits into
10XGenomics:masterfrom
vlovich:dma

Conversation

@vlovich

@vlovich vlovich commented Mar 14, 2024

Copy link
Copy Markdown
Contributor

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
vlovich force-pushed the dma branch 3 times, most recently from b207f61 to da9db22 Compare March 15, 2024 03:25
@vlovich
vlovich force-pushed the dma branch 2 times, most recently from 80e2767 to b2f1f63 Compare April 6, 2024 02: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