summaryrefslogtreecommitdiff
path: root/test/benchmarking/AVL-insert-random.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-07-16 13:06:38 +1000
committerAdriaan Moors <adriaan.moors@typesafe.com>2015-07-15 22:32:43 -0700
commita2973dfd954c0c094f956becb05a82bee5f7da01 (patch)
tree2135ee1616ff3920d00c35046be2037af9aa3a3f /test/benchmarking/AVL-insert-random.scala
parentfa8012d28687986902ce1255a19f9f49affb3bca (diff)
downloadscala-a2973dfd954c0c094f956becb05a82bee5f7da01.tar.gz
scala-a2973dfd954c0c094f956becb05a82bee5f7da01.tar.bz2
scala-a2973dfd954c0c094f956becb05a82bee5f7da01.zip
Remove further references to forkjoin
Use j.u.c.Forkjoin directly in active and disabled tests Remove bitrotted benchmarks code I was going to update these to use `java.util.concurrent.ForkJoin` directly, instead of our deprecated stubs. But most of them don't compile anymore (e.g. scala.testing.Benchmark has been removed, ClassTag imports missing). While I'm all for benchmarks, we should have large swathes of code checked in that isn't at compiled and run automatically. I'm happy to help someone resurrect these in a suitable form.
Diffstat (limited to 'test/benchmarking/AVL-insert-random.scala')
-rw-r--r--test/benchmarking/AVL-insert-random.scala67
1 files changed, 0 insertions, 67 deletions
diff --git a/test/benchmarking/AVL-insert-random.scala b/test/benchmarking/AVL-insert-random.scala
deleted file mode 100644
index 7299e330f5..0000000000
--- a/test/benchmarking/AVL-insert-random.scala
+++ /dev/null
@@ -1,67 +0,0 @@
-package scala.collection
-
-
-
-
-
-class Dummy(val a: Int) extends math.Ordered[Dummy] {
- def compare(other: Dummy) = this.a - other.a
- override def toString = a.toString
-}
-
-
-object RandomGlobal {
- val sz = 500000
- val data = util.Random.shuffle((0 until sz) map { new Dummy(_) }) toArray;
-}
-
-
-import RandomGlobal._
-
-
-object RandomAVL extends testing.Benchmark {
-
- def run() {
- val avl = new collection.mutable.TreeSet[Dummy]
-
- var i = 0
- while (i < sz) {
- val elem = data(i)
- avl += elem
- i += 1
- }
- }
-
-}
-
-
-object RandomImmutableTreeSet extends testing.Benchmark {
-
- def run() {
- var tree = new collection.immutable.TreeSet[Dummy]
-
- var i = 0
- while (i < sz) {
- val elem = data(i)
- tree += elem
- i += 1
- }
- }
-
-}
-
-
-object RandomJavaTreeSet extends testing.Benchmark {
-
- def run() {
- val tree = new java.util.TreeSet[Dummy]
-
- var i = 0
- while (i < sz) {
- val elem = data(i)
- tree add elem
- i += 1
- }
- }
-
-}