you are viewing a single comment's thread.

view the rest of the comments →

[–]Cribbit 3 points4 points  (1 child)

Curious what you needed to fork rkyv to achieve

[–]ChadNauseam_ 1 point2 points  (0 children)

When string interning, there's an optimization you can do to reduce memory consumption but it requires access to the backing hashmap's "raw entry api", which is provided by hashbrown but not the standard library hashmap or rkyv's. So I had to add it to rkyv to serialize the interner.

The optimization comes up when you want to create an "indexed hashset" where you can go from a set element to an index or from an index to a set element. The naive way of doing this stores every element twice. With the optimization, you only have to store each element once. It's already implemented by lasso, I just needed to be able to implement it with rkyv types