Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Refactor the internal Value data structure and make some perfor…
…mance improvements (#245) This PR refactors the internal Value data structure that is used to hold a loaded or an unloaded map value. Previous we had stored `Rc<Enum>`-s where `Enum` was either a loaded value (`Vec<u8>`) or an unloaded value (`offset: Bytes`). The new representation stores a `OnceCell` inside the enum so we no longer need `Rc`. The new representation makes it possible to hand out plain references to the loaded values (whereas a special `Ref` wrapper was necessary previously). Using this, we can optimize some of the code paths leading to good performance gains.
- Loading branch information