vigna / fastutil

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

ByteBuffer-based OpenHashMap structures for flat structures #318

Closed faucct closed 9 months ago

faucct commented 9 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 9 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.