summaryrefslogtreecommitdiff
path: root/test/files/run/array-addition.check
diff options
context:
space:
mode:
authorJean-Remi Desjardins <jeanremi.desjardins@gmail.com>2012-12-23 16:44:59 -0500
committerJean-Remi Desjardins <jeanremi.desjardins@gmail.com>2012-12-23 16:44:59 -0500
commit02b2da63409af6a28824cbb74d00d0ec04518c8d (patch)
treeb72c244fb5927b985ad166f49823e7f780787b91 /test/files/run/array-addition.check
parent14aa26ca0c346adbc79ccf4c0c9c35bbdd80c201 (diff)
downloadscala-02b2da63409af6a28824cbb74d00d0ec04518c8d.tar.gz
scala-02b2da63409af6a28824cbb74d00d0ec04518c8d.tar.bz2
scala-02b2da63409af6a28824cbb74d00d0ec04518c8d.zip
SI-5017 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
Diffstat (limited to 'test/files/run/array-addition.check')
-rw-r--r--test/files/run/array-addition.check4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/run/array-addition.check b/test/files/run/array-addition.check
new file mode 100644
index 0000000000..7bfbd9c711
--- /dev/null
+++ b/test/files/run/array-addition.check
@@ -0,0 +1,4 @@
+Array(1, 2, 3, 4)
+Array(1, 2, 3, 4)
+Array(1)
+Array(1)