Commit 9c8ad7e
src: elide heap allocation in structured clone implementation
Small perf improvement:
$ node benchmark/compare.js --runs 100 \
> --old ./node-0da120f879 --new ./node \
> --filter structured-clone misc > comparison.csv && \
> npx node-benchmark-compare comparison.csv
[00:02:15|% 100| 1/1 files | 200/200 runs | 3/3 configs]: Done
confidence improvement accuracy (*) (**) (***)
misc/structured-clone.js n=10000 type='arraybuffer' ** 1.81 % ±1.28% ±1.68% ±2.16%
misc/structured-clone.js n=10000 type='object' * 0.62 % ±0.55% ±0.73% ±0.93%
misc/structured-clone.js n=10000 type='string' *** 8.30 % ±1.46% ±1.92% ±2.47%
Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 3 comparisons, you can thus expect the following amount of false-positive results:
0.15 false positives, when considering a 5% risk acceptance (*, **, ***),
0.03 false positives, when considering a 1% risk acceptance (**, ***),
0.00 false positives, when considering a 0.1% risk acceptance (***)
PR-URL: #61703
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>1 parent 439b816 commit 9c8ad7e
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1619 | 1619 | | |
1620 | 1620 | | |
1621 | 1621 | | |
1622 | | - | |
| 1622 | + | |
1623 | 1623 | | |
1624 | | - | |
| 1624 | + | |
1625 | 1625 | | |
1626 | | - | |
| 1626 | + | |
1627 | 1627 | | |
1628 | 1628 | | |
1629 | 1629 | | |
| |||
0 commit comments