You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the "case v: IndexedSeq[_]" only matches mutable IndexedSeq, whereas this optimization would also be valid for structures like the immutable Vector.
The text was updated successfully, but these errors were encountered:
Commit Message Bot (anonymous) said:
(extempore in r25509) A conceivably pretty bad performance bug in builders.
#4821 pointed out that ArrayBuffer's ++ checks for a cheap size
method by matching on IndexedSeq, but mutable.IndexedSeq, so all
immutable collections are thrown in the same group as linear seqs.
I went looking for other examples of this and found them, in
key classes like Builder.
The "type shadowing trap" is a serious issue in the collections.
Closes #4821, no review.
The code for ++= in ArrayBuffer.scala is currently this:
However, the "case v: IndexedSeq[_]" only matches mutable IndexedSeq, whereas this optimization would also be valid for structures like the immutable Vector.
The text was updated successfully, but these errors were encountered: