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

Remove creation of intermediate lists in mapN #2296

Merged
merged 2 commits into from
Mar 4, 2021
Merged

Conversation

nomisRev
Copy link
Member

@nomisRev nomisRev commented Mar 4, 2021

Review in #2292 revealed a perf issue in mapN for Iterable. This PR fixes it for 0.12.0 so it can be merged into 0.13.0 as well.

The issue being that flatMap creates intermediate ArrayList, and we're thus creating a lot of ArrayList whilst we can get away with creating a single ArrayList.

@nomisRev nomisRev requested review from a team and pakoito March 4, 2021 08:37
@nomisRev nomisRev added the 0.12.0 label Mar 4, 2021
Copy link
Member

@raulraja raulraja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @nomisRev !

Copy link
Member

@rachelcarmena rachelcarmena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@nomisRev
Copy link
Member Author

nomisRev commented Mar 4, 2021

@pakoito I'm going to go ahead and merge this already. Feedback welcome 😘

@nomisRev nomisRev merged commit c537259 into master Mar 4, 2021
@nomisRev nomisRev deleted the sv-list-mapn-fix branch March 4, 2021 11:18
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