Unverified Commit fbad8bb1 authored by Anatoli Papirovski's avatar Anatoli Papirovski
Browse files

async_hooks: update defaultTriggerAsyncIdScope for perf

The existing version of defaultTriggerAsyncIdScope creates an Array
for the callback's arguments which is highly inefficient. Instead,
use rest syntax and allow V8 to do that work for us. This yields
roughly 2x performance for this particular function.

PR-URL: https://github.com/nodejs/node/pull/18004


Reviewed-By: default avatarAndreas Madsen <amwebdk@gmail.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent 5a1aeab2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment