Skip to content

stream: resolve perf regression introduced by V8 7.3

This commit contains two fixes:

  1. use instanceof instead of Object.getPrototypeOf, as checking an object prototype with Object.getPrototypeOf is slower than an instanceof check.
  2. avoid parseInt(undefined, 10) to get NaN as it regressed.

Fixes: https://github.com/nodejs/node/issues/28586

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

Merge request reports

Loading