Skip to content

Commit

Permalink
docs: update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Dec 26, 2023
1 parent 51e4136 commit 7f453ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ Please view [`tsx`][] for its document

## Benchmark

It is about 20x faster than [`sync-threads`](https://github.com/lambci/sync-threads) but 3x slower than native for reading the file content itself 1000 times during runtime, and 18x faster than `sync-threads` but 4x slower than native for total time.
It is about 50x faster than [`sync-threads`](https://github.com/lambci/sync-threads) but 10x slower than native for reading the file content itself 1000 times during runtime, and 40x faster than `sync-threads` but 10x slower than native for total time on my personal MacBook Pro with 64G M1 Max.

And it's almost same as [`deasync`](https://github.com/abbr/deasync) but requires no native bindings or `node-gyp`.
And it's almost 5x faster than [`deasync`](https://github.com/abbr/deasync) but requires no native bindings or `node-gyp`.

See [benchmark.cjs](./benchmarks/benchmark.cjs.txt) and [benchmark.esm](./benchmarks/benchmark.esm.txt) for more details.

Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmark.cjs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $ node benchmarks/benchmark.cjs
┌───────────┬────────────┬──────────────┬───────────────────┬────────────┬────────────────┬───────────┬─────────────────┐
│ (index) │ synckit │ sync-threads │ perf sync-threads │ deasync │ perf deasync │ native │ perf native │
├───────────┼────────────┼──────────────┼───────────────────┼────────────┼────────────────┼───────────┼─────────────────┤
│ loadTime │ '13.13ms' │ '2.05ms' │ '6.42x slower' │ '9.73ms' │ '1.35x slower' │ '0.45ms' │ '29.50x slower' │
│ runTime │ '288.46ms' │ '6167.96ms' │ '21.38x faster' │ '323.32ms' │ '1.12x faster' │ '44.70ms' │ '6.45x slower'
│ totalTime │ '301.59ms' │ '6170.01ms' │ '20.46x faster' │ '333.06ms' │ '1.10x faster' │ '45.15ms' │ '6.68x slower'
│ loadTime │ '9.01ms' │ '0.80ms' │ '11.29x slower' │ '20.32ms' │ '2.26x faster' │ '0.37ms' │ '24.37x slower' │
│ runTime │ '109.97ms' │ '5166.40ms' │ '46.98x faster' │ '557.75ms' │ '5.07x faster' │ '10.56ms' │ '10.41x slower' │
│ totalTime │ '118.98ms' │ '5167.20ms' │ '43.43x faster' │ '578.07ms' │ '4.86x faster' │ '10.93ms' │ '10.88x slower' │
└───────────┴────────────┴──────────────┴───────────────────┴────────────┴────────────────┴───────────┴─────────────────┘
6 changes: 3 additions & 3 deletions benchmarks/benchmark.esm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $ node benchmarks/benchmark.js
┌───────────┬────────────┬──────────────┬───────────────────┬────────────┬────────────────┬───────────┬─────────────────┐
│ (index) │ synckit │ sync-threads │ perf sync-threads │ deasync │ perf deasync │ native │ perf native │
├───────────┼────────────┼──────────────┼───────────────────┼────────────┼────────────────┼───────────┼─────────────────┤
│ loadTime │ '29.26ms' │ '2.26ms' │ '12.92x slower' │ '17.44ms' │ '1.68x slower' │ '1.02ms' │ '28.72x slower' │
│ runTime │ '286.99ms' │ '5520.70ms' │ '19.24x faster' │ '398.49ms' │ '1.39x faster' │ '47.83ms' │ '6.00x slower'
│ totalTime │ '316.24ms' │ '5522.96ms' │ '17.46x faster' │ '415.93ms' │ '1.32x faster' │ '48.85ms' │ '6.47x slower'
│ loadTime │ '16.97ms' │ '1.04ms' │ '16.37x slower' │ '9.67ms' │ '1.76x slower' │ '0.56ms' │ '30.19x slower' │
│ runTime │ '122.19ms' │ '4970.21ms' │ '40.67x faster' │ '633.51ms' │ '5.18x faster' │ '10.47ms' │ '11.67x slower' │
│ totalTime │ '139.16ms' │ '4971.25ms' │ '35.72x faster' │ '643.18ms' │ '4.62x faster' │ '11.03ms' │ '12.61x slower' │
└───────────┴────────────┴──────────────┴───────────────────┴────────────┴────────────────┴───────────┴─────────────────┘

0 comments on commit 7f453ca

Please sign in to comment.