-
Notifications
You must be signed in to change notification settings - Fork 23
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
chore: benchmark Protobuf-ES #89
Changes from 7 commits
7e5e349
25ea0c4
d498640
f6307eb
b7594a4
ff779dd
5b81e55
84842e8
4a63508
d60c310
24f9614
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,20 +17,17 @@ | |
|
||
## Install | ||
|
||
```console | ||
$ npm i protons-benchmark | ||
``` | ||
|
||
```console | ||
$ git clone [email protected]:ipfs/protons.git | ||
$ cd protons | ||
$ npm i | ||
$ npm run build | ||
$ cd packages/protons-benchmark | ||
``` | ||
|
||
## Usage | ||
|
||
Run the benchmark suite: | ||
Run the benchmark suite in node: | ||
|
||
```console | ||
$ npm start | ||
|
@@ -48,10 +45,11 @@ $ npm start | |
> [email protected] start | ||
> node dist/src/index.js | ||
|
||
pbjs x 11,798 ops/sec ±4.58% (88 runs sampled) | ||
protons x 11,693 ops/sec ±2.69% (85 runs sampled) | ||
protobuf.js x 12,419 ops/sec ±1.66% (88 runs sampled) | ||
@protobuf-ts x 10,536 ops/sec ±3.14% (85 runs sampled) | ||
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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ Slowest. |
||
Fastest is protobuf.js | ||
``` | ||
|
||
|
@@ -64,11 +62,12 @@ $ npm run start:browser | |
> npx playwright-test dist/src/index.js --runner benchmark | ||
|
||
✔ chromium set up | ||
pbjs x 19,027 ops/sec ±0.86% (67 runs sampled) | ||
protons x 18,901 ops/sec ±0.65% (67 runs sampled) | ||
protobuf.js x 18,937 ops/sec ±0.55% (65 runs sampled) | ||
@protobuf-ts x 16,669 ops/sec ±0.49% (68 runs sampled) | ||
Fastest is pbjs,protobuf.js | ||
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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ Slowest. |
||
Fastest is protobuf.js,pbjs | ||
``` | ||
|
||
## API Docs | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way for this config file to live in the |
||
plugins: | ||
- name: es | ||
path: ../../node_modules/.bin/protoc-gen-es | ||
opt: target=ts | ||
out: ./src/protobuf-es |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as https://github.com/ipfs/protons/pull/89/files#r1357807337 |
||
breaking: | ||
use: | ||
- FILE | ||
lint: | ||
use: | ||
- DEFAULT | ||
except: | ||
- ENUM_ZERO_VALUE_SUFFIX | ||
- ENUM_VALUE_PREFIX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.