-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for TC-39's async iteration proposal? #10
Comments
I might add interface support, but (and this is a bit but) async iteration is a lot slower than asynciterator. It has been a deliberate choice to develop asynciterator, even though the asyc iteration effort was going on, for performance reasons. So while you could then My colleague @joachimvh did some testing earlier this year: LinkedDataFragments/HDT-Node#9 (comment) |
@RubenVerborgh I see! Thank you for pointing me to that. |
The linked comment seems to talk about testing the transpiled versions of async generators, though; the native performance should be better. |
@joachimvh Do we have native performance tests? |
I just removed the transpilation step now and it did improve but is still much slower than AsyncIterator (usual disclaimer of this not being the most extensive tests ever etc.) |
Perphaps relevant for this discussion: node 10 has (experimental) support for using a readable stream as an async iterator. This would not solve any possible performance issue, but it could mean we wouldnt have to implement an async iterator interface and a streaming interface. |
Would it be possible to extend
asynciterator
to support TC-39's async iteration proposal? It is starting to be implemented by browsers and has landed as a new way to consume streams in Node.js 10.x .The text was updated successfully, but these errors were encountered: