Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

use switch (num) to cover more common cases and improve perf #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jedwards1211
Copy link

Just an idea, I don't know if there are any ramifications to this, but according to my jsperf test this is 58% faster for num <= 5 馃憤

Just an idea, I don't know if there are any ramifications to this, but according to [my jsperf test](https://jsperf.com/repeat-stream-optimization) this is 58% faster for `num <= 5` 馃憤
@jedwards1211 jedwards1211 changed the title use switch (num) to cover more common cases use switch (num) to cover more common cases and improve perf Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant