Skip to content

events: use Reflect.apply

Instead of callback bound apply, instead use the standard Reflect.apply. This is both safer and appears to offer a slight performance benefit. Perhaps due to not having to search the prototype tree? No clue tbh but I'm seeing 3-5% difference with substantial significance.

Refs: https://github.com/nodejs/node/issues/12956

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

domain, events

Merge request reports

Loading