Skip to content

stream: move rejectedHandledRecord to native#64472

Draft
aduh95 wants to merge 1 commit into
nodejs:mainfrom
aduh95:reject-promise-native
Draft

stream: move rejectedHandledRecord to native#64472
aduh95 wants to merge 1 commit into
nodejs:mainfrom
aduh95:reject-promise-native

Conversation

@aduh95

@aduh95 aduh95 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Let's see if it's faster

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. typings util Issues and PRs related to the built-in util module. web streams labels Jul 13, 2026
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1885/
Benchmark GHA (webstreams): https://github.com/nodejs/node/actions/runs/29243127788

Results

[!WARNING]
Do not take GHA benchmark results as face value, always confirm them
using a dedicated machine, e.g. Jenkins CI.

Benchmark results:

                                                                       confidence improvement accuracy (*)    (**)   (***)
webstreams/creation.js kind='ReadableStream.tee' n=50000                               2.77 %       ±5.69%  ±7.51%  ±9.63%
webstreams/creation.js kind='ReadableStream' n=50000                                   2.91 %       ±6.30%  ±8.31% ±10.66%
webstreams/creation.js kind='ReadableStreamBYOBReader' n=50000                        -2.18 %       ±6.18%  ±8.14% ±10.45%
webstreams/creation.js kind='ReadableStreamDefaultReader' n=50000                      1.47 %       ±7.27%  ±9.59% ±12.30%
webstreams/creation.js kind='TransformStream' n=50000                                 -1.02 %       ±4.92%  ±6.48%  ±8.32%
webstreams/creation.js kind='WritableStream' n=50000                                   0.15 %       ±5.79%  ±7.63%  ±9.79%
webstreams/js_transfer.js n=10000 payload='ReadableStream'                            -1.59 %       ±9.21% ±12.14% ±15.58%
webstreams/js_transfer.js n=10000 payload='TransformStream'                           -0.15 %       ±8.54% ±11.26% ±14.45%
webstreams/js_transfer.js n=10000 payload='WritableStream'                            -0.45 %       ±9.26% ±12.20% ±15.66%
webstreams/pipe-to.js highWaterMarkW=1024 highWaterMarkR=1024 n=500000                 1.19 %       ±6.99%  ±9.22% ±11.83%
webstreams/pipe-to.js highWaterMarkW=1024 highWaterMarkR=2048 n=500000                 0.87 %       ±6.90%  ±9.10% ±11.67%
webstreams/pipe-to.js highWaterMarkW=1024 highWaterMarkR=4096 n=500000                 0.31 %       ±6.77%  ±8.92% ±11.45%
webstreams/pipe-to.js highWaterMarkW=1024 highWaterMarkR=512 n=500000                  1.58 %       ±6.75%  ±8.90% ±11.42%
webstreams/pipe-to.js highWaterMarkW=2048 highWaterMarkR=1024 n=500000                 0.58 %       ±6.74%  ±8.89% ±11.41%
webstreams/pipe-to.js highWaterMarkW=2048 highWaterMarkR=2048 n=500000                 0.70 %       ±6.86%  ±9.04% ±11.60%
webstreams/pipe-to.js highWaterMarkW=2048 highWaterMarkR=4096 n=500000                 1.02 %       ±6.98%  ±9.20% ±11.80%
webstreams/pipe-to.js highWaterMarkW=2048 highWaterMarkR=512 n=500000                  2.16 %       ±6.87%  ±9.06% ±11.62%
webstreams/pipe-to.js highWaterMarkW=4096 highWaterMarkR=1024 n=500000                 1.79 %       ±6.92%  ±9.13% ±11.71%
webstreams/pipe-to.js highWaterMarkW=4096 highWaterMarkR=2048 n=500000                 0.61 %       ±6.81%  ±8.98% ±11.52%
webstreams/pipe-to.js highWaterMarkW=4096 highWaterMarkR=4096 n=500000                -0.52 %       ±6.72%  ±8.86% ±11.36%
webstreams/pipe-to.js highWaterMarkW=4096 highWaterMarkR=512 n=500000                  2.16 %       ±6.99%  ±9.21% ±11.82%
webstreams/pipe-to.js highWaterMarkW=512 highWaterMarkR=1024 n=500000                  2.84 %       ±6.90%  ±9.10% ±11.67%
webstreams/pipe-to.js highWaterMarkW=512 highWaterMarkR=2048 n=500000                  1.19 %       ±6.78%  ±8.93% ±11.46%
webstreams/pipe-to.js highWaterMarkW=512 highWaterMarkR=4096 n=500000                  0.57 %       ±7.12%  ±9.39% ±12.04%
webstreams/pipe-to.js highWaterMarkW=512 highWaterMarkR=512 n=500000                   1.64 %       ±6.82%  ±8.99% ±11.54%
webstreams/readable-async-iterator.js type='bytes' n=100000                            1.70 %       ±6.86%  ±9.04% ±11.60%
webstreams/readable-async-iterator.js type='normal' n=100000                           1.10 %       ±4.52%  ±5.96%  ±7.65%
webstreams/readable-read-buffered.js bufferSize=1 n=100000                            -0.29 %       ±3.80%  ±5.01%  ±6.43%
webstreams/readable-read-buffered.js bufferSize=10 n=100000                            2.62 %       ±3.46%  ±4.56%  ±5.86%
webstreams/readable-read-buffered.js bufferSize=100 n=100000                          -0.02 %       ±3.50%  ±4.61%  ±5.92%
webstreams/readable-read-buffered.js bufferSize=1000 n=100000                         -1.26 %       ±3.82%  ±5.04%  ±6.47%
webstreams/readable-read.js type='byob' n=100000                                       0.23 %       ±6.62%  ±8.73% ±11.20%
webstreams/readable-read.js type='normal' n=100000                                     0.92 %       ±4.08%  ±5.38%  ±6.90%

Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case, there are 33 comparisons, you can thus
expect the following amount of false-positive results:
  1.65 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.33 false positives, when considering a   1% risk acceptance (**, ***),
  0.03 false positives, when considering a 0.1% risk acceptance (***)

[!WARNING]
Do not take GHA benchmark results as face value, always confirm them
using a dedicated machine, e.g. Jenkins CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. typings util Issues and PRs related to the built-in util module. web streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants