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

feat: add another runtimes #143

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion packages/protons-benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $ npm start
[15:02:32] tsc [completed]

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

pbjs x 19,188 ops/sec ±0.38% (98 runs sampled)
protons x 19,001 ops/sec ±0.33% (95 runs sampled)
Expand All @@ -53,6 +53,38 @@ protobuf-es x 15,673 ops/sec ±0.48% (93 runs sampled)
Fastest is protobuf.js
```

Or in a Deno:

```console
$ npm run start:deno

> protons-benchmark@0.0.0 start:deno
> deno --allow-env dist/src/implementations/index.js

pbjs x 20,665 ops/sec ±0.55% (93 runs sampled)
protons x 19,791 ops/sec ±0.51% (95 runs sampled)
protobuf.js x 20,222 ops/sec ±0.56% (93 runs sampled)
@protobuf-ts x 18,185 ops/sec ±0.62% (95 runs sampled)
protobuf-es x 18,327 ops/sec ±0.68% (92 runs sampled)
Fastest is pbjs
```

Or in a Bun:

```console
$ npm run start:bun

> protons-benchmark@0.0.0 start:bun
> bun dist/src/implementations/index.js

pbjs x 28,574 ops/sec ±0.59% (91 runs sampled)
protons x 28,162 ops/sec ±0.53% (92 runs sampled)
protobuf.js x 27,920 ops/sec ±0.83% (97 runs sampled)
@protobuf-ts x 26,250 ops/sec ±0.96% (93 runs sampled)
protobuf-es x 25,727 ops/sec ±0.51% (94 runs sampled)
Fastest is pbjs
```

Or in a browser:

```console
Expand Down
2 changes: 2 additions & 0 deletions packages/protons-benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"build": "aegir build --no-bundle && cp -R src/implementations/protobufjs dist/src/implementations/protobufjs",
"prestart": "npm run build",
"start": "node dist/src/implementations/index.js",
"start:bun": "bun dist/src/implementations/index.js",
"start:deno": "deno --allow-env dist/src/implementations/index.js",
"start:browser": "npx playwright-test dist/src/implementations/index.js --runner benchmark"
},
"dependencies": {
Expand Down