Merge 2.12.x to 2.13.x [ci: last-only]#93
Merged
Conversation
backport 2.13 immutable RedBlackTree to 2.12
…mark_backport backport a benchmark. Adjust API for 2.12
Avoid creation of Option for TreeMap.getOrElse
avoid creation of ListBuffers for Seq.empty and Seq()
remove stale mima exception
use seq to work correctly with parallel collections
Dehoist many closures from Types
better diagnostics from AllocationTest
While profiling a build I noticed that calls to disectApplied via `isSelfOrSuperConstrCall` was an allocation hotspot. These use cases only need to strip Apply/TypeApply, so in this commit I've duplicated a few lines of code to to this.
- Avoid null checks by comparing Symbols with eq rather than ==
- Eagerly compute `selectorClass` to avoid null check on each
access, and pass it as a parameter rather than as a field.
…ructuctorCall Avoid allocation of TreeInfo.Applied
Microopts in FindMember
No Unit.depends bookkeeping if -Ytrack-dependencies:false
Direct implementations of MapN.{filterImpl,exists,forall}
(cherry picked from commit 8821b30)
Optimized iterators for immutable.SetN
Avoids projecting to a temporary List.
(cherry picked from commit 3e223d1)
Optimized filter for immutable.SetN
Avoids creating iterators and using builders and reuses the
input collection when the predicate selects all elements.
(cherry picked from commit 20b4596)
Improve performance of atPos under -Yrangepos
Put @transient on an (inner) object and it works kinda like @transient lazy val, as you may have expected.
Last time I tried this I got called out for relaxing too much. As justification, Java does not respect self types (so there would be a separate-compilation inconsistency to try to enforce them) nor does it understand non-stable prefixes. Fixes scala/bug#11917, or at least kinda patches over it.
Makes scala faster to build and to download; what's not to like?
Reduce the size of WrappedArray
… collection.immutable.Seq#canBuildFrom Update List#flatMap to - share the last list non-empty segment if we can easily - reduce allocations in other cases - improve CPU usage add test for isLikeListReusableCBF to ensure that if a future Scala version change to result of the Seq builder we detect the change and can adjust accordingly
i.e. TreeSet and TreeMap (cherry picked from commit 65eb39e)
(cherry picked from commit 11f93da)
Erroneous commit was: ``` commit 2c620a7 Merge: abcde58 8270221 Author: Jason Zaugg <jzaugg@gmail.com> Date: Thu May 14 11:17:30 2020 +1000 Merge commit '8270221567' into merge/2.12.x-to-2.13.x-20200514 ``` According to scala#8783, which removed `|| k != tree.key`, there was no behaviour change in 2.13.x, this was just a cleanup.
99039c1 to
69ff105
Compare
69ff105 to
6d1cdae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This merge stops before the Java annotation parsing PR.
I'll tackle that in a later step.
Some of the 2.12 collections PRs have had their test cases
merged forward.
Rough merge plan: https://gist.github.com/retronym/8dbb0b2b515d200d5109fc0f76d1941d