BrownBag about node.js performance
- libuv + v8 + sauce = node.js
- see https://github.com/nodejs/node
See event loop brownbag
Example:
- https://github.com/nodejs/node/blob/v10.x/lib/internal/crypto/pbkdf2.js
- https://github.com/nodejs/node/blob/v10.x/src/node_crypto.cc#L4706
It looks like C++ Addons 😲
npm run start:measure simple
npm run start:measure single
npm run start:measure queue
npm run start:measure pool
npm run start:measure pool+1
npm run start:measure 2*pool
npm run start:measure cpus
npm run start:measure cpus-2
npm run start:measure quiz
npm run start:cluster simple
npm run start:cluster single
npm run start:cluster cluster
npm run start:cluster cpus
npm run start:cluster 2*cpus
# sudo apt install apache2-utils
ab -c 10 -n 10 http://localhost:3000/
npm i webworker-threads
npm run start:workers eval
npm run start:workers worker
npm run start:workers native # requires --experimental-worker flag