i ran the test-script on travis-ci against various v8/nodejs versions (including v8-6.6/node-10) [1] [2].
here are the raw data and visualization [3] of recursive-callback/promise/async-await vs v8/nodejs-versions. not-surprisingly, recursive-callbacks are consistently faster, but only a small margin (7-13%) than promises across historical nodejs versions on travis-ci.
of note:
the standard deviation error-bars should be taken with a grain of salt, as the travis-ci rerun indicates higher inconsistency
the low numbers from node-0.9 and node-0.10 are meaningless, as the sockets seem to constantly hang and timeout according to travis logs.
note the sudden drop for the travis-ci rerun of node-9.11.1 (don’t have explanation, and the travis-logs shows the low numbers are quite consistent within the rerun)
node-10.0.0 is slower than node-8.11.1, including the travis rerun
async/await is only available on node-7 and higher
i ran the test-script on travis-ci against various v8/nodejs versions (including v8-6.6/node-10) [1] [2].
here are the raw data and visualization [3] of recursive-callback/promise/async-await vs v8/nodejs-versions. not-surprisingly, recursive-callbacks are consistently faster, but only a small margin (7-13%) than promises across historical nodejs versions on travis-ci.
of note:
[1] travis-ci build logs #20 travis-ci.org/kaizhu256/node-performance-recursiveCallback-vs-promise-vs-asyncAwait/builds/372961240, travis-ci.org/kaizhu256/node-performance-recursiveCallback-vs-promise-vs-asyncAwait/builds/372961240
[2] travis-ci build logs #21 (rerun to verify consistency) travis-ci.org/kaizhu256/node-performance-recursiveCallback-vs-promise-vs-asyncAwait/builds/373134575, travis-ci.org/kaizhu256/node-performance-recursiveCallback-vs-promise-vs-asyncAwait/builds/373134575
[3] visualisation kaizhu256.github.io/node-performance-recursiveCallback-vs-promise-vs-asyncAwait/index.html, kaizhu256.github.io/node-performance-recursiveCallback-vs-promise-vs-asyncAwait/index.html
kai zhu kaizhu256 at gmail.com