stream: add fast-path for readable streams#45489
stream: add fast-path for readable streams#45489anonrig wants to merge 3 commits intonodejs:mainfrom
Conversation
|
Review requested:
|
|
I don't link the decrease for latin1. |
|
@mcollina I updated the pr description with the CI result. My educated guess would be; its because of normalizeEncoding |
|
Can't we make |
We can't because |
e2ac788 to
9f72045
Compare
|
I force pushed and fixed the tests. Will be running a new benchmark soon. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Overall this change LGTM but, like @mcollina I am concerned about the regression on latin1. I'd like to see if there's a way to avoid that here. |
This comment was marked as outdated.
This comment was marked as outdated.
9f72045 to
76a866f
Compare
76a866f to
85f49ea
Compare
mcollina
left a comment
There was a problem hiding this comment.
This change requires a bit more work due to readable-stream extraction that this will break due to the new dependencies:
FastBuffer and TextEncoder and normalizeEncoding might not be available. Could you put all that logic in a function imported from a different file? In this way it would be significantly easier to replace.
85f49ea to
853ecc4
Compare
|
It seems I forgot to add |
|
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1228/ Results |
Commit Queue failed- Loading data for nodejs/node/pull/45489 ✔ Done loading data for nodejs/node/pull/45489 ----------------------------------- PR info ------------------------------------ Title stream: add fast-path for readable streams (#45489) Author Yagiz Nizipli (@anonrig) Branch anonrig:perf/stream-encoding -> nodejs:main Labels stream, performance, needs-ci Commits 2 - stream: add fast-path for readable streams - fixup! stream: add fast-path for readable streams Committers 1 - Yagiz Nizipli PR-URL: https://github.com/nodejs/node/pull/45489 Reviewed-By: Antoine du Hamel Reviewed-By: Matteo Collina ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/45489 Reviewed-By: Antoine du Hamel Reviewed-By: Matteo Collina -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - fixup! stream: add fast-path for readable streams ℹ This PR was created on Wed, 16 Nov 2022 19:23:56 GMT ✔ Approvals: 2 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/45489#pullrequestreview-1187122865 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/45489#pullrequestreview-1187113060 ✔ Last GitHub CI successful ℹ Last Benchmark CI on 2022-11-21T18:10:58Z: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1228/ ℹ Last Full PR CI on 2022-11-21T18:10:00Z: https://ci.nodejs.org/job/node-test-pull-request/48072/ - Querying data for job/node-test-pull-request/1228/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/3518963825 |
|
The perf look worse for chunk of length 256, should we use the "fast-path" only when |
19bc7e4 to
9ecac0b
Compare
|
(Hopefully last) Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1243/ |
|
This does not seems to be helping: |
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1225/
Results