Is there a plan to optimize async generators?

13 views
Skip to first unread message

Reve

unread,
Jun 18, 2026, 5:58:00 AM (19 hours ago) Jun 18
to v8-dev
async-iterable.ts
Basically I want this:  async function* createAsyncGen(list: Promise<any>[]) { yield* list; } 
But it is 1.4x slower than implementing the iterator protocol manually, which needs way more code

Camillo Bruni

unread,
Jun 18, 2026, 7:17:52 AM (17 hours ago) Jun 18
to v8-...@googlegroups.com
Hi,
This is on our radar by optimising the lazy-collections jetstream workload which covers some aspects of async functions and iterators. If you have a more concrete use-case feel free to add it to JetStream – this is the easiest way for us to pick this up long term.

Cheers,
Camillo

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/v8-dev/34dcd231-06d5-4a49-b4ad-4aed09290b14n%40googlegroups.com.
Camillo Bruni | Software Engineer, V8 | Google Germany GmbH | Erika-Mann Str. 33, 80636 München 

Registergericht und -nummer: Hamburg, HRB 86891 | Sitz der Gesellschaft: Hamburg | Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Diese E-Mail ist vertraulich. Falls Ssie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.  This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.
Reply all
Reply to author
Forward
0 new messages