Skip to content

Instantly share code, notes, and snippets.

@bouzuya
Created December 21, 2015 05:52
Show Gist options
  • Select an option

  • Save bouzuya/126f4360347e9ce17870 to your computer and use it in GitHub Desktop.

Select an option

Save bouzuya/126f4360347e9ce17870 to your computer and use it in GitHub Desktop.
most.js のベンチマークを実行してみた
$ npm ls
most-perf@0.10.0 /Users/yamauchi/.ghq/github.com/cujojs/most/test/perf
├── @reactivex/rxjs@5.0.0-beta.0
├── baconjs@0.7.83
├─┬ benchmark@2.0.0-pre (git://github.com/bestiejs/benchmark.js.git#d996372edec2da9f7265b0d9d5138542d0b756ec)
│ ├── lodash-compat@3.10.1
│ └── platform@1.3.0
├── highland@2.5.1
├── kefir@3.2.0
├── lodash@3.10.1
└── rx@4.0.7
$ node --version
v0.12.7
$ npm start
> most-perf@0.10.0 start /Users/yamauchi/.ghq/github.com/cujojs/most/test/perf
> npm run concatMap && npm run filter-map-reduce && npm run flatMap && npm run scan && npm run skipRepeats && npm run zip
> most-perf@0.10.0 concatMap /Users/yamauchi/.ghq/github.com/cujojs/most/test/perf
> node ./concatMap.js
concatMap 1000 x 1000 streams
-------------------------------------------------------
most 110.05 op/s ± 0.54% (82 samples)
rx 4 1.11 op/s ± 1.00% (10 samples)
rx 5 7.07 op/s ± 3.57% (38 samples)
kefir 12.04 op/s ± 0.79% (59 samples)
bacon 0.93 op/s ± 6.99% (9 samples)
lodash 18.60 op/s ± 3.43% (35 samples)
Array 0.39 op/s ± 1.66% (5 samples)
-------------------------------------------------------
> most-perf@0.10.0 filter-map-reduce /Users/yamauchi/.ghq/github.com/cujojs/most/test/perf
> node ./filter-map-reduce
filter -> map -> reduce 1000000 integers
-------------------------------------------------------
most 357.25 op/s ± 0.57% (83 samples)
rx 4 0.78 op/s ± 5.61% (8 samples)
rx 5 4.15 op/s ± 0.65% (24 samples)
kefir 13.18 op/s ± 0.87% (63 samples)
bacon 1.27 op/s ± 2.63% (11 samples)
highland 5.76 op/s ± 1.33% (32 samples)
lodash 39.95 op/s ± 11.37% (42 samples)
Array 9.32 op/s ± 1.89% (28 samples)
-------------------------------------------------------
> most-perf@0.10.0 flatMap /Users/yamauchi/.ghq/github.com/cujojs/most/test/perf
> node ./flatMap.js
flatMap 1000 x 1000 streams
-------------------------------------------------------
most 125.10 op/s ± 0.87% (80 samples)
rx 4 0.55 op/s ± 2.88% (7 samples)
rx 5 7.72 op/s ± 1.01% (40 samples)
kefir 11.50 op/s ± 0.72% (56 samples)
bacon 1.11 op/s ± 0.70% (10 samples)
highland 0.10 op/s ± 5.75% (5 samples)
lodash 19.01 op/s ± 5.61% (36 samples)
Array 0.38 op/s ± 1.16% (5 samples)
-------------------------------------------------------
> most-perf@0.10.0 scan /Users/yamauchi/.ghq/github.com/cujojs/most/test/perf
> node ./scan.js
scan -> reduce 1000000 integers
-------------------------------------------------------
most 332.67 op/s ± 0.93% (82 samples)
rx 4 0.86 op/s ± 2.46% (9 samples)
rx 5 4.21 op/s ± 1.04% (25 samples)
kefir 17.23 op/s ± 0.77% (78 samples)
bacon 1.02 op/s ± 2.05% (10 samples)
highland 4.66 op/s ± 1.76% (27 samples)
lodash 29.15 op/s ± 6.62% (39 samples)
Array 7.18 op/s ± 6.15% (23 samples)
-------------------------------------------------------
> most-perf@0.10.0 skipRepeats /Users/yamauchi/.ghq/github.com/cujojs/most/test/perf
> node ./skipRepeats.js
skipRepeats -> reduce 2 x 1000000 integers
-------------------------------------------------------
most 271.86 op/s ± 0.71% (80 samples)
rx 4 0.93 op/s ± 1.11% (9 samples)
rx 5 5.62 op/s ± 0.41% (31 samples)
kefir 16.02 op/s ± 0.61% (73 samples)
bacon 1.48 op/s ± 3.67% (12 samples)
lodash 55.73 op/s ± 4.21% (55 samples)
Array 12.29 op/s ± 1.69% (34 samples)
-------------------------------------------------------
> most-perf@0.10.0 zip /Users/yamauchi/.ghq/github.com/cujojs/most/test/perf
> node ./zip.js
zip 2 x 100000 integers
-------------------------------------------------------
most 99.10 op/s ± 1.78% (76 samples)
rx 4 2.67 op/s ± 1.11% (17 samples)
rx 5 18.71 op/s ± 3.19% (47 samples)
kefir 22.61 op/s ± 0.65% (55 samples)
bacon 0.87 op/s ± 3.95% (9 samples)
highland 0.31 op/s ± 8.13% (6 samples)
lodash 44.54 op/s ± 3.16% (55 samples)
-------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment