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

Minor perf improvements #9

Merged
merged 2 commits into from
Jul 14, 2015
Merged

Minor perf improvements #9

merged 2 commits into from
Jul 14, 2015

Conversation

heyimalex
Copy link
Contributor

First one should close #8. Second one just makes sense to me: we create params as an array, then spread it to memoize only to have memoize coerce it back to an array. Compile with babel and check out how much extraneous code it generates.

The number of selectors can't change at runtime and we already check
whether lastArgs is null in memoize.
@faassen
Copy link
Collaborator

faassen commented Jul 14, 2015

Okay, looks good. One possible objection is that now the signature of the memoized function is different from the original function, but since the whole memoization is happening in private functions anyway, that's really an implementation detail.

faassen added a commit that referenced this pull request Jul 14, 2015
@faassen faassen merged commit b28af72 into reduxjs:master Jul 14, 2015
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.

don't check for argument length comparison
2 participants