vigna / fastutil

fastutil extends the Java™ Collections Framework by providing type-specific maps, sets, lists and queues.
Apache License 2.0
1.74k stars 194 forks source link

ByteBuffer-based OpenHashMap structures for flat structures #318

Closed faucct closed 4 months ago

faucct commented 4 months ago

It would be nice to have implementations with keys and values backed by ByteBuffers or their typed analogs. They could be used to build maps storable in flat structures, e.g. https://flatbuffers.dev. After storing the maps in flat structures it should be possible to reconstruct them from ByteBuffer to get a read-only open hash map without copying memory.

vigna commented 4 months ago

That's exactly what we did in ε-serde! Unfortunately, it's in Rust. Unless someone writes a very good PR I don't see this happening in Java in a short time frame.