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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local listenersToPut and call listenersToPut length only once #1352

Closed
wants to merge 1 commit into from

Conversation

SanderSpies
Copy link
Contributor

No description provided.

…. And only ask for the length of listenersToPut once.
@sophiebits
Copy link
Collaborator

Is this supposed to be faster? My guess is it makes no difference.

@sophiebits
Copy link
Collaborator

I don't think this adds much so I'm going to close it out -- let me know if I'm missing something.

@sophiebits sophiebits closed this May 18, 2014
@syranide
Copy link
Contributor

I think the preferred pattern for speed is (given that nothing is falsey):

var listenerToPut;
for (var i = 0, listenerToPut = listenersToPut[i]; i++) {

But this should definitely not be a hot path, so it shouldn't have any impact.

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