-
Notifications
You must be signed in to change notification settings - Fork 1
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
Why not for of
?
#1
Comments
I didn't run any tests, but my gut says:
But this is just speculation, the only way to know for sure it to test a variety of cases. Properly will also depend on the runtime you are using as iterators are a recent addition and I expect more modern runtimes to have more efficient implementations of them. |
Not sure what you mean, I didn't really use Oh, if you mean const filter = p => function* filter(it) {
for (const x of it) if (p(x)) yield fn(x);
} But I meant the fact that you manually called |
So I tested the difference between using |
Lets make benchmark |
Would defining the functions like this instead impact performance?
The text was updated successfully, but these errors were encountered: