A Faster Serialization Library Based on Compile-time Reflection and C++ 20
summary
A serialization library called struct pack uses compile-time reflection in C++20 to avoid per-field type tags, generate a compile-time MD5 type hash placed at the front of the binary, and special-case trivially copyable and contiguous containers to memcpy whole payloads. Benchmarks claim about 3× faster than msgpack and protobuf and up to hundreds of times faster for trivial-copy scenes; the implementation is open source and the approach succeeds on the presented test cases.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 0:22Other Serialization Libraries
- 3:45structpack
- 11:03type checking
- 13:41hash code
- 20:25testing
related talks
56mEverything is serialization
45mBetter C++14 reflections
06mImplementing a High Performance Serialization Library
23mFunctional Programming in C++ (Run time vs Compile time types)
01h 03mC++ Reflection: Back on Track
05mUsing type_traits and constexpr to make code more readable/debuggable
23mRspack: The Rust-Fueled Bundling Breakthrough
01h 31mISO C++ Standards Committee Panel Discussion
