GithubHelp home page GithubHelp logo

proto_benchmarks's Introduction

Protocol Benchmarks

Below some details about the tests, graphs generated by Criterion will be included.

A conclusion drawn from pure (de)serialization times would suggest that one should always use Cap'n Proto. Somewhat surprising, to me, is that the process of building the object to serialize is slower in Cap'n Proto vs protobuf, see the last graph below.

Running cargo bench in this repository can be done to explore these results on your system.

The structs used to test these can be viewed in the protos directory, summarized here for easy access:

@0xd1f1c56543bdb3ac;

struct Basic {
    id @0 :UInt64;
}

struct Complex {
    name @0 :Text;
    basic @1 :Basic;
    reference @2 :Text;
}
syntax = "proto2";
option optimize_for = SPEED;

package bench;

message Basic {
    required uint64 id = 1;
}

message Complex {
    required string name = 1;
    required Basic basic = 2;
    required string reference = 3;
}

Basic Read

Basic Read

Basic Write

Basic Write

Complex Read

Complex Read

Complex Write

Complex Write

Complex Build

This benchmark is the same as the write above, but includes the actual struct construction.

Complex Build

proto_benchmarks's People

Contributors

chrismacnaughton avatar

Stargazers

AlexStorm avatar Konstantin Ladutenko avatar Paul Serraino avatar frankfanslc avatar eryk avatar LeXaB avatar Oscar Gutierrez avatar Elias Levy avatar José Luis Cruz avatar  avatar Salvador Guzman avatar Georgios Konstantopoulos avatar Norm O avatar Subhajeet Dey avatar  avatar Richard Feldman avatar P小二 avatar Sean Jensen-Grey avatar

Watchers

James Cloos avatar  avatar

proto_benchmarks's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.