Skip to content

Heap pre-allocation (for capacity, not dynamic sizing) #23

@rrichardson

Description

@rrichardson

This was discussed a bit in #18, but I have a need for an exceedingly fast, zero-runtime-allocation Sorted Map. We need to hand a few dozen GBs to the SGMap. That's not something we'd ever be able to put on the stack :)

If Scapegoat SGMap could possibly be parameterized to use TinyVec::SliceVec instead of ArrayVec, we'd have everything we need. Scapegoat could remain no-std and fully safe. We'd be doing the unsafe stuff (MMapping actually) to supply the slice to TinyVec::SliceVec

I think it would be simplest to have a feature flag slice-vec that swapped out the ArrayVec for a SliceVec, and introduced a from_slice or with_slice? associated function.

If this or something similar is amenable, I would be happy to submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions