Matteo Collina
158f6f78d4
stream: share webstreams async iterator methods
...
ReadableStream.prototype.values() built each iterator from an object
literal with a computed symbol-key method plus five closures. Such a
literal is rebuilt through the runtime on every evaluation, costing
close to a microsecond per iterator, which dominates iterating a
short-lived stream.
Move next() and return() to a shared ReadableStreamAsyncIterator
prototype, as for any WebIDL async iterator, and keep the per-iterator
state in its read request. The prototype chain and property shape are
the ones WPT checks; the placeholder AsyncIterator object in util.js is
no longer needed. As in WebIDL, next() and return() now reject when
called on something that is not a ReadableStream async iterator, and
iterators no longer carry own next/return properties.
Add an async-iterator kind to benchmark/webstreams/lifecycle.js.
webstreams/lifecycle.js kind='async-iterator' *** +16.22%
Signed-off-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs/node/pull/66392
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
2026-10-06 01:42:25 +02:00
..
2026-10-03 17:30:27 +02:00
2026-09-29 00:25:06 +02:00
2026-09-27 17:26:12 +02:00
2026-09-28 23:54:50 +02:00
2026-09-28 23:54:49 +02:00
2026-09-28 23:54:49 +02:00
2026-09-28 23:54:45 +02:00
2026-09-29 00:25:12 +02:00
2026-09-29 00:25:12 +02:00
2026-09-27 17:25:51 +02:00
2026-10-03 17:30:24 +02:00
2026-09-18 15:33:33 +02:00
2026-10-03 17:30:23 +02:00
2026-09-18 15:33:46 +02:00
2026-09-28 23:54:49 +02:00
2026-09-28 23:54:48 +02:00
2026-09-18 14:52:04 +02:00
2026-09-20 23:14:22 +02:00
2026-10-03 15:26:14 +02:00
2026-09-27 17:26:15 +02:00
2026-09-27 17:26:15 +02:00
2026-09-27 17:26:15 +02:00
2026-09-20 23:14:23 +02:00
2026-09-27 17:26:15 +02:00
2026-09-27 17:26:15 +02:00
2026-09-20 23:14:23 +02:00
2026-09-28 23:54:49 +02:00
2026-09-18 14:49:45 +02:00
2026-09-18 14:49:45 +02:00
2026-09-20 23:14:23 +02:00
2026-09-27 17:26:15 +02:00
2026-09-20 23:14:23 +02:00
2026-09-28 23:54:45 +02:00
2026-10-03 17:30:28 +02:00
2026-09-18 14:52:04 +02:00
2026-09-20 23:14:22 +02:00
2026-09-20 23:14:23 +02:00
2026-09-28 23:54:49 +02:00
2026-09-28 23:54:51 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-17 17:24:34 +02:00
2026-09-28 23:54:53 +02:00
2026-09-28 23:54:53 +02:00
2026-09-28 23:54:49 +02:00
2026-09-28 23:54:50 +02:00
2026-09-20 23:14:22 +02:00
2026-09-29 00:25:12 +02:00
2026-09-29 00:25:12 +02:00
2026-09-18 15:33:30 +02:00
2026-10-03 17:30:27 +02:00
2026-10-03 17:30:24 +02:00
2026-09-28 23:54:52 +02:00
2026-09-28 23:54:50 +02:00
2026-09-18 15:33:32 +02:00
2026-09-28 23:54:49 +02:00
2026-09-27 17:26:22 +02:00
2026-09-27 17:26:13 +02:00
2026-10-03 17:30:24 +02:00
2026-09-17 17:24:34 +02:00
2026-10-05 18:23:30 +02:00
2026-09-27 17:26:12 +02:00
2026-10-05 18:23:30 +02:00
2026-09-28 23:54:52 +02:00
2026-10-03 17:30:11 +02:00
2026-10-03 17:48:55 +02:00
2026-09-28 23:54:51 +02:00
2026-09-28 23:54:50 +02:00
2026-10-03 17:30:23 +02:00
2026-09-29 00:25:09 +02:00
2026-09-28 23:54:50 +02:00
2026-09-28 23:54:51 +02:00
2026-10-03 17:30:22 +02:00
2026-09-28 23:54:50 +02:00
2026-09-18 15:33:35 +02:00
2026-10-03 17:30:22 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:53 +02:00
2026-10-06 01:42:16 +02:00
2026-10-03 17:30:27 +02:00
2026-09-28 23:54:33 +02:00
2026-10-03 15:27:52 +02:00
2026-09-18 15:33:34 +02:00
2026-09-18 15:33:34 +02:00
2026-09-27 17:26:12 +02:00
2026-09-29 00:25:06 +02:00
2026-09-28 23:54:44 +02:00
2026-10-03 17:30:24 +02:00
2026-09-29 00:25:06 +02:00
2026-09-28 23:54:44 +02:00
2026-09-29 00:25:06 +02:00
2026-09-28 23:54:44 +02:00
2026-09-29 00:25:06 +02:00
2026-09-29 00:25:10 +02:00
2026-09-29 00:25:10 +02:00
2026-09-29 00:25:10 +02:00
2026-09-29 00:25:06 +02:00
2026-09-29 00:25:06 +02:00
2026-09-27 17:25:56 +02:00
2026-09-27 17:25:56 +02:00
2026-09-27 17:25:56 +02:00
2026-09-27 17:25:56 +02:00
2026-09-27 17:26:10 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:49 +02:00
2026-09-17 17:24:34 +02:00
2026-09-28 23:54:49 +02:00
2026-09-29 00:33:14 +02:00
2026-10-03 17:30:28 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-18 14:52:03 +02:00
2026-09-18 15:33:38 +02:00
2026-09-27 17:25:56 +02:00
2026-09-28 23:54:43 +02:00
2026-09-28 23:54:43 +02:00
2026-09-28 23:54:48 +02:00
2026-09-28 23:54:51 +02:00
2026-10-03 17:30:26 +02:00
2026-09-27 17:26:13 +02:00
2026-09-27 17:26:11 +02:00
2026-09-29 00:33:14 +02:00
2026-10-03 17:30:25 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-10-03 17:30:25 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-10-03 17:30:21 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-09-29 00:33:14 +02:00
2026-10-03 17:30:22 +02:00
2026-09-29 00:33:14 +02:00
2026-09-18 15:33:31 +02:00
2026-09-28 23:54:44 +02:00
2026-09-27 17:26:14 +02:00
2026-09-27 17:26:13 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-27 17:26:14 +02:00
2026-09-27 17:26:13 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-27 17:26:14 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-18 14:52:03 +02:00
2026-09-28 23:54:43 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:43 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:44 +02:00
2026-09-28 23:54:52 +02:00
2026-09-18 15:33:34 +02:00
2026-09-27 17:26:11 +02:00
2026-09-18 14:52:02 +02:00
2026-09-28 23:54:48 +02:00
2026-09-27 17:25:51 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:33 +02:00
2026-09-28 23:54:33 +02:00
2026-10-03 17:30:28 +02:00
2026-09-28 23:54:49 +02:00
2026-10-03 17:30:23 +02:00
2026-10-03 17:30:23 +02:00
2026-09-28 23:54:53 +02:00
2026-09-29 00:25:04 +02:00
2026-09-29 00:25:04 +02:00
2026-09-18 14:52:02 +02:00
2026-09-29 00:25:06 +02:00
2026-09-27 17:26:14 +02:00
2026-09-27 17:26:14 +02:00
2026-09-28 23:54:49 +02:00
2026-09-28 23:54:54 +02:00
2026-09-27 17:26:15 +02:00
2026-09-28 23:54:46 +02:00
2026-10-03 15:26:14 +02:00
2026-09-28 23:54:45 +02:00
2026-09-28 23:54:45 +02:00
2026-09-28 23:54:46 +02:00
2026-10-03 15:26:13 +02:00
2026-09-28 23:54:47 +02:00
2026-09-27 17:26:15 +02:00
2026-09-28 23:54:49 +02:00
2026-09-27 17:26:15 +02:00
2026-09-27 17:26:15 +02:00
2026-09-28 23:54:46 +02:00
2026-09-28 23:54:47 +02:00
2026-09-27 17:26:15 +02:00
2026-10-03 15:26:14 +02:00
2026-09-28 23:54:46 +02:00
2026-10-03 15:26:14 +02:00
2026-09-28 23:54:47 +02:00
2026-09-27 17:26:15 +02:00
2026-09-28 23:54:49 +02:00
2026-10-03 17:30:22 +02:00
2026-10-03 17:30:22 +02:00
2026-10-03 17:30:22 +02:00
2026-10-03 17:30:22 +02:00
2026-10-03 15:26:14 +02:00
2026-10-03 15:26:14 +02:00
2026-10-03 15:26:14 +02:00
2026-09-28 23:54:45 +02:00
2026-09-28 23:54:45 +02:00
2026-09-28 23:54:47 +02:00
2026-09-28 23:54:46 +02:00
2026-10-03 15:26:14 +02:00
2026-09-28 23:54:46 +02:00
2026-09-28 23:54:47 +02:00
2026-10-03 15:26:14 +02:00
2026-09-27 17:26:15 +02:00
2026-09-28 23:54:48 +02:00
2026-10-03 15:26:13 +02:00
2026-09-28 23:54:46 +02:00
2026-09-28 23:54:46 +02:00
2026-10-03 15:26:14 +02:00
2026-09-28 23:54:45 +02:00
2026-09-28 23:54:45 +02:00
2026-09-27 17:26:15 +02:00
2026-09-28 23:54:47 +02:00
2026-09-28 23:54:46 +02:00
2026-09-28 23:54:47 +02:00
2026-09-28 23:54:47 +02:00
2026-10-03 15:26:14 +02:00
2026-09-28 23:54:49 +02:00
2026-10-03 15:26:13 +02:00
2026-09-28 23:54:46 +02:00
2026-09-28 23:54:46 +02:00
2026-09-27 17:26:15 +02:00
2026-09-28 23:54:47 +02:00
2026-10-03 15:26:13 +02:00
2026-10-03 17:30:22 +02:00
2026-09-28 23:54:50 +02:00
2026-10-03 17:30:21 +02:00
2026-10-03 17:30:21 +02:00
2026-10-03 17:30:21 +02:00
2026-10-03 17:30:21 +02:00
2026-09-28 23:54:52 +02:00
2026-09-28 23:54:52 +02:00
2026-10-06 01:42:25 +02:00
2026-09-28 23:54:48 +02:00
2026-09-28 23:54:53 +02:00
2026-09-27 17:26:11 +02:00
2026-09-28 23:54:52 +02:00
2026-09-28 23:54:52 +02:00
2026-10-03 17:59:39 +02:00
2026-09-28 23:54:52 +02:00
2026-10-03 17:30:27 +02:00
2026-10-03 17:30:21 +02:00
2026-09-28 23:54:48 +02:00