node/lib/internal/streams
Yoo 8a2fec1f6f
lib: optimize writable stream buffer clearing
Improved the `clearBuffer` function
by replacing `buffered.splice` with `ArrayPrototypeSlice`.
- Eliminates O(N) shifting overhead.
- Improves CPU utilization and reduces GC overhead.

PR-URL: https://github.com/nodejs/node/pull/59406
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-08-11 03:29:01 +00:00
..
add-abort-signal.js lib: remove Symbol[Async]Dispose polyfills 2024-10-07 09:47:44 +00:00
compose.js lib: replace spread operator with primordials function 2024-08-12 07:05:39 +00:00
destroy.js lib: enforce ASCII order in error code imports 2024-04-23 17:05:38 +00:00
duplex.js lib: prefer logical assignment 2024-10-09 06:42:16 +00:00
duplexify.js Revert "stream: handle generator destruction from Duplex.from()" 2024-12-24 13:30:54 +00:00
duplexpair.js stream: expose DuplexPair API 2024-07-26 08:09:23 +00:00
end-of-stream.js stream: preserve AsyncLocalStorage context in finished() 2025-04-16 09:27:37 +00:00
fast-utf8-stream.js fs: port SonicBoom module to fs module as Utf8Stream 2025-07-28 20:27:07 -07:00
from.js lib: prefer optional chaining 2024-09-24 19:48:15 +00:00
lazy_transform.js crypto: do not overwrite _writableState.defaultEncoding 2023-08-27 14:12:29 +00:00
legacy.js stream: fix eventNames() to not return not defined events 2024-02-27 23:56:43 +00:00
operators.js lib: enforce ASCII order in error code imports 2024-04-23 17:05:38 +00:00
passthrough.js lib: revert primordials in a hot path 2021-04-19 10:23:01 +02:00
pipeline.js stream: propagate AbortSignal reason 2024-10-22 16:14:02 +00:00
readable.js lib: make ERM functions into wrappers returning undefined 2025-05-25 13:44:43 +00:00
state.js stream: bump default highWaterMark 2024-03-13 19:02:14 +00:00
transform.js lib: fix typos in comments within internal/streams 2024-08-05 01:58:40 +00:00
utils.js lib: prefer optional chaining 2024-09-24 19:48:15 +00:00
writable.js lib: optimize writable stream buffer clearing 2025-08-11 03:29:01 +00:00