Skip to content

protons-runtime 5.x is 2x slower than protons-runtime 3.x #109

@twoeths

Description

@twoeths

This is the proto file https://github.com/ChainSafe/js-libp2p-gossipsub/blob/v10.0.0/src/message/rpc.proto

This is the testing code https://github.com/ChainSafe/js-libp2p-gossipsub/blob/v10.0.0/test/benchmark/protobuf.test.ts

With protons-runtime v3 I got:

protobuf
    ✔ decode Attestation message                      3446018 ops/s    290.1900 ns/op        -    2053201 runs   60.1 s
    ✔ encode Attestation message                       2506831 ops/s    398.9100 ns/op        -    1492091 runs   60.0 s

with protons-runtime v5 I got:

protobuf
    ✔ decode Attestation message using protons 5.1.0                       1645793 ops/s    607.6100 ns/op        -     983127 runs   60.1 s
    ✔ encode Attestation message using protons 5.1.0                       1630497 ops/s    613.3100 ns/op        -     972079 runs   60.0 s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions