Skip to content

Latest commit

 

History

History
94 lines (64 loc) · 3.1 KB

README.md

File metadata and controls

94 lines (64 loc) · 3.1 KB

protons-benchmark

ipfs.tech Discuss codecov CI

Protobuf to ts transpiler

Table of contents

Install

$ git clone git@github.com:ipfs/protons.git
$ cd protons
$ npm i
$ npm run build
$ cd packages/protons-benchmark

Usage

Run the benchmark suite in node:

$ npm start

> protons-benchmark@0.0.0 prestart
> npm run build


> protons-benchmark@0.0.0 build
> aegir build --no-bundle && cp -R src/protobufjs dist/src/protobufjs

[15:02:28] tsc [started]
[15:02:32] tsc [completed]

> protons-benchmark@0.0.0 start
> node dist/src/index.js

pbjs x 19,188 ops/sec ±0.38% (98 runs sampled)
protons x 19,001 ops/sec ±0.33% (95 runs sampled)
protobuf.js x 19,558 ops/sec ±0.30% (91 runs sampled)
@protobuf-ts x 17,216 ops/sec ±0.32% (95 runs sampled)
protobuf-es x 15,673 ops/sec ±0.48% (93 runs sampled)
Fastest is protobuf.js

Or in a browser:

$ npm run start:browser

> protons-benchmark@0.0.0 start:browser
> npx playwright-test dist/src/index.js --runner benchmark

✔ chromium set up
pbjs x 19,763 ops/sec ±0.35% (67 runs sampled)
protons x 19,617 ops/sec ±0.37% (68 runs sampled)
protobuf.js x 19,772 ops/sec ±0.34% (67 runs sampled)
@protobuf-ts x 17,204 ops/sec ±0.33% (69 runs sampled)
protobuf-es x 16,032 ops/sec ±0.38% (68 runs sampled)
Fastest is protobuf.js,pbjs

API Docs

License

Licensed under either of

Contribute

Contributions welcome! Please check out the issues.

Also see our contributing document for more information on how we work, and about contributing in general.

Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.