You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @acarl005. Thanks for the awesome library. Would you consider switching from generators (using the yield keyword) to basic JS iterators (just the object with the next function & following JS iterator protocol) so that it remains possible to use your library with more old-school JS engines (+ attaching Symbol.iterator so that your API remains totally unchanged)?
I could help you achieve that by recoding the necessary parts if you'd like.
As a side note, I am wondering whether you attempted to benchmark generators vs. iterator protocol and if you went for generators for obvious performance reasons I missed.
Have a good day.
The text was updated successfully, but these errors were encountered:
@Yomguithereal I'm not really interested in supporting older JS engines. There are many other libraries to choose from if the engine doesn't have generators.
Yeah I did run benchmarks on one function that I re-wrote to use the plain iterator protocol. It was on Node v6.0.0 and generators were a little over 2 times slower. But I ran them again when Node v7 came out and they are nearly the same. I trust that generators will become more optimized over time.
Hello @acarl005. Thanks for the awesome library. Would you consider switching from generators (using the
yield
keyword) to basic JS iterators (just the object with thenext
function & following JS iterator protocol) so that it remains possible to use your library with more old-school JS engines (+ attachingSymbol.iterator
so that your API remains totally unchanged)?I could help you achieve that by recoding the necessary parts if you'd like.
As a side note, I am wondering whether you attempted to benchmark generators vs. iterator protocol and if you went for generators for obvious performance reasons I missed.
Have a good day.
The text was updated successfully, but these errors were encountered: