Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

perf(limitTo): replace for loop with slice #10475

Closed
wants to merge 1 commit into from

Conversation

kwypchlo
Copy link
Contributor

By replacing for loop with a slice we get a microscopic (but still :) ) performance boost while additional limit makes sure that if limit is 0 or NaN the function will return empty array.

@googlebot
Copy link

CLAs look good, thanks!

@lgalfaso lgalfaso added this to the 1.3.8 milestone Dec 16, 2014
@lgalfaso lgalfaso self-assigned this Dec 16, 2014
@lgalfaso
Copy link
Contributor

LGTM

@lgalfaso
Copy link
Contributor

landed as cd77c08

@lgalfaso lgalfaso closed this Dec 16, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants