4.4 Library benchmarks

Performance and memory consumption of newly created cereal\_fwd was compared against original cereal, Boost.Serialization, as similar library, and Protocol Buffers as popular non-C++-dedicated solution. The time taken to serialize and deserialize data was comparable; however the fastest for numbers and collection of numbers was Protocol Buffers; the slowest turned out to be Boost.Serialization. For pointers the fastest was cereal or cereal\_fwd, the slowest was Boost.Serialization, and Protocol Buffers does not support deep pointers serialization.

Usage of memory allocated on heap was measured using total number of allocations (number of calls to memory manager) and maximal size of the heap. All libraries (Boost.Serialization, Protocol Buffers, cereal and our cereal\_fwd) had similar usage of the memory when serializing numbers, collections and pointers; all differences were not statistically significant.

Size of created executable was 30% bigger for our cereal\_fwd than for cereal and comparable with Boost.Serialization. Protocol Buffers had the smallest code size for serializing numbers, but in the case of collections, code size was the biggest.

The benchmark results are available at project web site.
