4 ms·
Depends on your needs. When i'm really concerned about deserialization time, i try to skip it entirely. Partial|Total zero copy deserialization is the thing to
by lijogdfljk 4y ago
Depends on your needs. When i'm really concerned about deserialization time, i try to skip it entirely. Partial|Total zero copy deserialization is the thing to reach for. Various libs exist, https://rkyv.org/ https://rkyv.org/ is what i've been toying with recently.
For those unfamiliar, here is the interesting bit:
> rkyv implements total zero-copy deserialization, which guarantees that no data is copied during deserialization and no work is done to deserialize data. It achieves this by structuring its encoded representation so that it is the same as the in-memory representation of the source type.
- conradev 4y agoThank you for linking to this! It is super cool that it serializes hash tables and b-trees because that is where serde’s zero copy parsing ends It seems perfect for my use case, which is putting stuff in a chunk of memory shared between processes