Skip to content

Avro benchmark numbers are not realistic at all #25

@amitv87

Description

@amitv87

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions