Platform info:

  • Windows_NT 10.0.15063 x64
  • Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz × 4

Async types tested:

  • Bluebird Promises = Bluebird 3.5.0 Promises
  • Native Promises = ES2015 Chrome V8 Promises
  • Async functions = ES2017 Chrome V8 Async Functions

Benchmarks:

  • Doxbee sequential
  • Madeup parallel

Doxbee sequential

./bench doxbee

Performance of Chrome V8 Promises in current versions of Node.js

Node.jsLTSChrome V8Time, msMemory, MB
v4.8.4Argon4.5.103.471433185.33
v6.11.2Boron5.1.281.1031468141.76
v8.4.0 + util.promisify(Carbon)6.0.286.5273061.86

Notes: performance of native promises in Node.js v8 improves by a factor of 2 with memory utilization dropping by a factor of 2.3-3.0 in comparison with the previous versions of Node.js.

Performance of Callbacks vs Promises vs Async Functions in Node.js v8

Node.js v8.4.0 (Carbon) / V8 6.0.286.52

Async TypeTime, msMemory, MB
Callbacks16133.54
Bluebird Promises37241.32
Async functions + Bluebird promisify58372.79
Native Promises + util.promisify73061.86
Async functions + util.promisify74379.89

Notes: native ES2015 Chrome V8 promises in Node.js v8 perform roughly 2 times slower than Bluebird promises using 50% more memory. In contrast, native ES2017 async functions in Node.js v8 perform only 30% slower than async functions with Bluebird promisify using roughly the same amount of memory.

Madeup parallel

./bench parallel

Performance of Chrome V8 Promises in current versions of Node.js

Node.jsLTSChrome V8Time, msMemory, MB
v4.8.4Argon4.5.103.473269496.14
v6.11.2Boron5.1.281.1033156447.39
v8.4.0 + util.promisify(Carbon)6.0.286.521274195.23

Notes: performance of native promises in Node.js v8 improves by a factor of 2.3-2.5 with memory utilization dropping by a factor of 2.1-2.6 in comparison with the previous versions of Node.js.

Performance of Callbacks vs Promises vs Async Functions in Node.js v8

Node.js v8.4.0 (Carbon) / V8 6.0.286.52

Async TypeTime, msMemory, MB
Callbacks37673.55
Bluebird Promises600106.58
Async Functions + Bluebird promisify636114.67
Async Functions + util.promisify1247202.34
Native Promises + util.promisify1274195.23

Notes: both native Chrome V8 ES2015 promises and ES2017 async functions perform roughly 2 times slower than Bluebird promises using almost 2 times more memory.

Conclusion

Node.js v8 comes with significantly improved performance of native ES2015 promises and ES2017 async functions, further boosted by the introduction of native util.promisify.