diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-06-29 14:05:59 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-06-29 14:05:59 +0000 |
commit | 52b863dd86ae854328f74d1d05ca71b2915fa7d7 (patch) | |
tree | d088283359939e87e4c9998f6873bc2ccc127782 /test/benchmarks | |
parent | b2abe22c97e0c588f7a5f68e970dbc78f87c6b29 (diff) | |
download | scala-52b863dd86ae854328f74d1d05ca71b2915fa7d7.tar.gz scala-52b863dd86ae854328f74d1d05ca71b2915fa7d7.tar.bz2 scala-52b863dd86ae854328f74d1d05ca71b2915fa7d7.zip |
Implemented lazy combiners for parallel hash trie.
Diffstat (limited to 'test/benchmarks')
-rw-r--r-- | test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala index 747178c1a4..fd6e1a8559 100644 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala +++ b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala @@ -29,7 +29,10 @@ trait ParallelHashTrieBenches[K, V] extends StandardParallelIterableBench[(K, V) extends IterableBench with StandardParallelIterableBench[(K, V), ParallelHashTrie[K, V]] { var result: Int = 0 def comparisonMap = collection.Map() - def runseq = result = this.seqcoll.map(operators.mapper2).size + def runseq = { + val r = this.seqcoll.asInstanceOf[collection.immutable.HashMap[K, V]].map(operators.mapper2) + result = r.size + } def runpar = { result = this.parcoll.map(operators.mapper2).size //println(collection.parallel.immutable.ParallelHashTrie.totalcombines) |