diff options
Diffstat (limited to 'test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala')
-rw-r--r-- | test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala deleted file mode 100644 index 9c6ac19229..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala +++ /dev/null @@ -1,30 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object CountList extends Companion { - def benchName = "count-list"; - def apply(sz: Int, parallelism: Int, what: String) = new CountList(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 1000 - - val listCreator = (i: Int) => (0 until (i % 50 + 50)).toList - val pred = (lst: List[Int]) => check(lst) - val predjsr = new extra166y.Ops.Predicate[List[Int]] { - def op(lst: List[Int]) = check(lst) - } - - def check(lst: List[Int]) = lst.foldLeft(0)((sum, n) => sum + n * n) % 2 == 0 -} - -class CountList(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, CountList.listCreator, new Array[Any](_), classOf[List[Int]]) { - def companion = CountList - override def repetitionsPerRun = 250 - - def runpar = pa.count(CountList.pred) - def runseq = sequentialCount(CountList.pred, sz) - def runjsr = jsrarr.withFilter(CountList.predjsr).size - def comparisonMap = collection.Map("jsr" -> runjsr _) -} |