-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
http2,zlib: prefer call() over apply() if argument list is not array
#60834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60834 +/- ##
==========================================
- Coverage 88.56% 88.54% -0.03%
==========================================
Files 703 703
Lines 208268 208256 -12
Branches 40175 40166 -9
==========================================
- Hits 184444 184390 -54
- Misses 15828 15864 +36
- Partials 7996 8002 +6
🚀 New features to boost your workflow:
|
|
Can you try to benchmark with |
|
confidence improvement accuracy (*) (**) (***)
zlib/creation.js n=500000 options='false' type='BrotliCompress' 0.12 % ±1.11% ±1.47% ±1.92%
zlib/creation.js n=500000 options='false' type='BrotliDecompress' 0.51 % ±0.89% ±1.19% ±1.55%
zlib/creation.js n=500000 options='false' type='Deflate' ** 1.57 % ±1.14% ±1.52% ±1.97%
zlib/creation.js n=500000 options='false' type='DeflateRaw' 0.82 % ±1.11% ±1.47% ±1.92%
zlib/creation.js n=500000 options='false' type='Gunzip' * 1.36 % ±1.16% ±1.54% ±2.00%
zlib/creation.js n=500000 options='false' type='Gzip' 0.88 % ±1.15% ±1.53% ±1.99%
zlib/creation.js n=500000 options='false' type='Inflate' 0.63 % ±1.27% ±1.69% ±2.20%
zlib/creation.js n=500000 options='false' type='InflateRaw' 0.98 % ±1.11% ±1.48% ±1.93%
zlib/creation.js n=500000 options='false' type='Unzip' 0.18 % ±0.98% ±1.31% ±1.70%
zlib/creation.js n=500000 options='false' type='ZstdCompress' ** 1.47 % ±0.85% ±1.13% ±1.47%
zlib/creation.js n=500000 options='false' type='ZstdDecompress' ** -1.75 % ±1.28% ±1.71% ±2.22%
zlib/creation.js n=500000 options='true' type='BrotliCompress' -0.88 % ±0.96% ±1.28% ±1.66%
zlib/creation.js n=500000 options='true' type='BrotliDecompress' 0.06 % ±0.86% ±1.14% ±1.49%
zlib/creation.js n=500000 options='true' type='Deflate' ** 1.86 % ±1.19% ±1.58% ±2.05%
zlib/creation.js n=500000 options='true' type='DeflateRaw' 0.93 % ±1.17% ±1.55% ±2.02%
zlib/creation.js n=500000 options='true' type='Gunzip' 0.12 % ±1.09% ±1.45% ±1.88%
zlib/creation.js n=500000 options='true' type='Gzip' ** 1.87 % ±1.26% ±1.68% ±2.18%
zlib/creation.js n=500000 options='true' type='Inflate' -0.11 % ±1.13% ±1.50% ±1.95%
zlib/creation.js n=500000 options='true' type='InflateRaw' 0.59 % ±1.07% ±1.42% ±1.85%
zlib/creation.js n=500000 options='true' type='Unzip' 0.16 % ±1.09% ±1.45% ±1.89%
zlib/creation.js n=500000 options='true' type='ZstdCompress' 0.56 % ±1.01% ±1.34% ±1.74%
zlib/creation.js n=500000 options='true' type='ZstdDecompress' -0.67 % ±1.20% ±1.59% ±2.08% |
Comparing it against |
|
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1766/ |
Correct. LiviaMedeiros@69cef00 against 8dc2bdd.
Zstd constructor is different than others in |
Follow-up from #60796
In
http2andzlib,fn.call(...)is preferable overFunctionPrototypeCall(fn, ...)according to:node/doc/contributing/primordials.md
Lines 7 to 13 in 8dc2bdd
Local benchmark shows about +5% performance in
zlib/creationand about +3-4% indeflateSyncandinflateSync