Skip to content

serialization

1 post with the tag “serialization”

Who Owns the Tree

A JSON-shaped MessagePack value whose copies share nothing.

A search engine moves documents around all day, and in C++ the way you hand one over decides what it costs. The sixteenth familiar is the document value itself, and every document lives in an arena of its own: a reference reaches into it, a move hands it over, and a copy builds a whole new one. When Xapiand needed many threads to share one document, it froze it and shared a pointer instead.