-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Improve List.mapConserve to avoid ListBuffer creation (from @retronym) #5650
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
Conversation
Does this change bring this code up to date with |
I've added a benchmark (which should be included in this PR) and compared results.
This suggests a worthwhile improvement in the case where we avoid the |
To run these benchmarks:
|
@som-snytt No it does not update map2conserve at the moment - I will add that |
8000
tr>
/rebuild |
FYI: We intend to cut 2.11.9 on Friday. Any PR that hasn't been merged until then will get pushed down to 2.12.x. The build failure looks spurious so I have restarted the build. Judging by the benchmark results it seems we need further improvement or a better explanation of the results before we can merge this in order to avoid performance regressiosn. |
I reran the benchmark on my machine with Java 1.8.0_102 and wasn't able to reproduce the large performance degradation for the Before:
After:
I also tried some alternative implementations that were all slower than the one proposed here. I think we should merge this (including the benchmark). |
@szeiger |
Let's use the same file name, it makes sense for both test cases. Once we merge this PR you can rebase the other one (which needs another update anyway) on top of it. |
I've bumped the deadline by a few days until Jan 31st. I would like to see as many of these 2.11.9 PRs merged as we can, but we do have to concentrate our efforts on 2.13 and 2.12 after that. |
great, i will try and get both my changes progressed over the weekend |
See #5664 for a consolidated version with test and mima (coming next) fixes |
b8bda8a
to
f0e1674
Compare
added your benchmark commit to #5664 |
Commits moved to #5664. Thanks! |
No description provided.