Closed holm closed 7 years ago
Great, but by principle I won't merge optimizations without a benchmark showing a statistical significant difference. I don't have time for that immediately, but likely within the next week. You can also do it, that would be awesome.
async-hook
has now been integrated into node-core, thus this module should no longer be used.
Thanks for your contributions, but will just close this. Any issues should be posted in https://github.com/nodejs/node.
The
Array.from(arguments
causes V8 to de-opt the function with aBad value context for arguments value
. Based on https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#what-is-safe-arguments-usage I found that copying the arguments using a regular for-loop avoids the de-opt.This might seem like a micro-optimization, but since this is hooked on process.nextTick it makes a significant difference for our use-case at least.