cpp-serializers
cpp-serializers copied to clipboard
Avro benchmark numbers are not realistic at all
function ** avro_serialization_test** is not at all efficient. As can be seen, for every encode / decode new resources are initialised, not an optimal technique.
Also the the default avro::InputStream and avro::OutputStream implementations are very rudimentary. Best to use a custom implementation.
for (size_t i = 0; i < iterations; i++) {
auto out = avro::memoryOutputStream();
auto encoder = avro::binaryEncoder();
encoder->init(*out);
avro::encode(*encoder, r1);
auto in = avro::memoryInputStream(*out);
auto decoder = avro::binaryDecoder();
decoder->init(*in);
avro::decode(*decoder, r2);
}
I found avro to be as performant as protobuf after making necessary changes
Thanks for the information. I'll try your suggestion.
The repo was very helpful for quick evaluation of various codecs, good work mate.