arximboldi / immer

Postmodern immutable and persistent data structures for C++ — value semantics at scale
https://sinusoid.es/immer
Boost Software License 1.0
2.51k stars 185 forks source link

Immer persist #278

Closed alex-sparus closed 2 months ago

alex-sparus commented 9 months ago

Structural sharing is traditionally preserved in memory only. When serializing multiple values to disk, these are linearized—for example, by writing out sequences as JSON arrays—losing whatever sharing may exist between these values. A similar thing happens when transforming data structures (as with std::transform or a functional map())

Here we introduce an experimental module immer::persist that enables the serialization of pools of containers while preserving structural sharing. With it, we can also do in-memory transformation over large sets of data that considers and preserves structural sharing. This is novel technique, not present in any other implementation of persistent data structures. It has a few use-cases inside BRONZE.

codecov-commenter commented 9 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 96.89922% with 4 lines in your changes missing coverage. Please review.

Project coverage is 90.54%. Comparing base (bd9f318) to head (646315e). Report is 114 commits behind head on master.

Files with missing lines Patch % Lines
test/oss-fuzz/flex-vector-st-0.cpp 96.15% 4 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #278 +/- ## ========================================== + Coverage 90.53% 90.54% +0.01% ========================================== Files 120 121 +1 Lines 12151 12220 +69 ========================================== + Hits 11001 11065 +64 - Misses 1150 1155 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

arximboldi commented 2 months ago

Alright! Thank you for all this work!