Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avro benchmark numbers are not realistic at all #25

Open
amitv87 opened this issue Apr 30, 2018 · 2 comments
Open

Avro benchmark numbers are not realistic at all #25

amitv87 opened this issue Apr 30, 2018 · 2 comments

Comments

@amitv87
Copy link

amitv87 commented Apr 30, 2018

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

@thekvs
Copy link
Owner

thekvs commented Apr 30, 2018

Thanks for the information. I'll try your suggestion.

@amitv87
Copy link
Author

amitv87 commented Apr 30, 2018

The repo was very helpful for quick evaluation of various codecs, good work mate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants