scala/scala — pull request #1739 by jedesah (2012-12-09 22:04:59+00:00)
Title: SI5017 Poor performance of :+ operator on Arrays

Control performance of :+ and +: operator on my machine were 700-800 ms

After adding size hint on the implementation in SeqLike, it went down to 500-600 ms

But with specialixed implementation in ArrayOps, brings it down to 300-400 ms

Unfortunatly, this method will only be called when the Array object is being referenced directly as it's type, but that should be the case enough times to justify the extra method.

I ended up removing the sizeHint in SeqLike because it made the execution of the "benchmark" slower when the Array was being manipulated as a Seq.

Side note: Interestingly enough, the benchmark performed better on my virtualized Fedora 17 with JDK 7 than natively on Mac OS X with JDK 6

Review by @axel22