Skip to content

perf(Queue#shift): minor opt #26

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

Merged
merged 1 commit into from
Jul 7, 2017

Conversation

julien-f
Copy link
Contributor

@julien-f julien-f commented Jul 6, 2017

Use Array.reverse() and swap the arrays instead of push+pop.

Use Array.reverse() and swap the arrays instead of push+pop.
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 98.551% when pulling 060dd99 on julien-f:patch-1 into 49c6812 on ForbesLindesay:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 98.551% when pulling 060dd99 on julien-f:patch-1 into 49c6812 on ForbesLindesay:master.

@ForbesLindesay ForbesLindesay merged commit 185faa1 into ForbesLindesay:master Jul 7, 2017
@ForbesLindesay
Copy link
Owner

Thanks, I'd love to know if you benchmarked this at all, but it's obviously an improvement.

@julien-f
Copy link
Contributor Author

julien-f commented Jul 7, 2017

No I did not, I also went with the obviously 😛

@julien-f julien-f deleted the patch-1 branch December 12, 2017 09:23
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.

3 participants