Currently the size type is set to uint64_t in helpers.hpp.
But this is a very big value and requires 8 bytes just to store a size. When serializing a million objects with many short strings that can add up to a lot of overhead (binary serializer).
In my project, using uint32_t instead of uint64_t made a difference of 93MB of the resulting serialized stream.
I suggest to make this configurable:
#ifndef CEREAL_SIZE_TYPE
using size_type = uint64_t;
#else
using size_type = CEREAL_SIZE_TYPE;
#endif
Currently the size type is set to uint64_t in helpers.hpp.
But this is a very big value and requires 8 bytes just to store a size. When serializing a million objects with many short strings that can add up to a lot of overhead (binary serializer).
In my project, using uint32_t instead of uint64_t made a difference of 93MB of the resulting serialized stream.
I suggest to make this configurable: