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

Fast path eachOf array case #1246

Merged
merged 2 commits into from
Jul 21, 2016
Merged

Fast path eachOf array case #1246

merged 2 commits into from
Jul 21, 2016

Conversation

megawac
Copy link
Collaborator

@megawac megawac commented Jul 20, 2016

#847 was a valuable change to the code base in which we definetely cleaned things up.

In this PR I want to add a special case, where we consider the array case separate from the generic case. I think this is important as I believe the parallel cases of each, eachOf, map, filter, etc when provided arrays are one of the hottest paths in the library. Therefore, I have decided to optimize parallel array processing for all methods which use eachOf for the array case and defer to the eachOfLimit implementation for objects and iterators.

On my run of the relevant benchmarks, the suite ran 27.4% faster

/cc @aearly @charlierudolph

@megawac megawac changed the title Fast path each of Fast path eachOf array case Jul 20, 2016
@charlierudolph
Copy link
Contributor

Fine by me. Might be good to document this decision somewhere that this was a case that was optimized for.

@aearly
Copy link
Collaborator

aearly commented Jul 21, 2016

LGTM. I remember we lost some performance in the pure parallel case when we ewnt with the Limit implementation.

@megawac megawac merged commit 0f75578 into master Jul 21, 2016
@megawac megawac deleted the fast-path-eachOf branch July 21, 2016 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants