-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-metaCross-cutting, high-level issues (for tracking many other implementation issues, ...).Cross-cutting, high-level issues (for tracking many other implementation issues, ...).
Description
I've been recommended not using a sync* function to generate an iterable in platform code because it is too slow.
We should not have a language feature that is so slow that you are better off not using it. Then we are better off not having it.
We should try to make sync* functions as efficient as a hand-coded iterator, or close to it.
(The VM might be able to run them on a separate stack, and avoid desugaring completely, which will make it as efficient as possible. Desugaring to a state-machine should be an optimizing compiler, not a simple translation.)
(I assume async* functions are slow too).
srawlins, a14n, natebosch, albertms10, FMorschel and 2 morealbertms10
Metadata
Metadata
Assignees
Labels
area-metaCross-cutting, high-level issues (for tracking many other implementation issues, ...).Cross-cutting, high-level issues (for tracking many other implementation issues, ...).