Permalink
Browse files

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.
  • Loading branch information...
1 parent fa8012d commit a2973dfd954c0c094f956becb05a82bee5f7da01 @retronym retronym committed with adriaanm Jul 16, 2015
Showing with 6 additions and 68,894 deletions.
  1. +0 −1 build-ant-macros.xml
  2. +0 −4 doc/LICENSE.md
  3. +0 −6 doc/License.rtf
  4. +0 −1 lib/forkjoin.jar.desired.sha1
  5. +1 −1 src/build/dbuild-meta-json-gen.scala
  6. +0 −11 src/intellij/forkjoin.iml.SAMPLE
  7. +0 −1 src/intellij/library.iml.SAMPLE
  8. +0 −1 src/intellij/scala.ipr.SAMPLE
  9. +0 −1 src/intellij/test-junit.iml.SAMPLE
  10. +0 −1 src/intellij/test.iml.SAMPLE
  11. +0 −67 test/benchmarking/AVL-insert-random.scala
  12. +0 −67 test/benchmarking/AVL-insert.scala
  13. +0 −73 test/benchmarking/ParCtrie-bfs.scala
  14. +0 −21 test/benchmarking/ParCtrie-map.scala
  15. +0 −39 test/benchmarking/ParCtrie-nums.scala
  16. +0 −37 test/benchmarking/ParCtrie-size.scala
  17. +0 −33 test/benchmarking/ParHashMap.scala
  18. +0 −33 test/benchmarking/ParVector-reduce.scala
  19. +0 −70 test/benchmarking/TreeSetInsert.scala
  20. +0 −65 test/benchmarking/TreeSetInsertRandom.scala
  21. +0 −69 test/benchmarking/TreeSetIterator.scala
  22. +0 −69 test/benchmarking/TreeSetRemove.scala
  23. +0 −66 test/benchmarking/TreeSetRemoveRandom.scala
  24. +0 −4,005 test/benchmarking/t6726-patmat-analysis.scala
  25. +0 −63 test/benchmarks/bench
  26. +0 −1 test/benchmarks/lib/jsr166_and_extra.jar.desired.sha1
  27. +0 −79 test/benchmarks/source.list
  28. +0 −61 test/benchmarks/src/scala/collection/immutable/range-bench.scala
  29. +0 −61 test/benchmarks/src/scala/collection/mutable/hashtable-bench.scala
  30. +0 −223 test/benchmarks/src/scala/collection/parallel/Benchmarking.scala
  31. +0 −126 test/benchmarks/src/scala/collection/parallel/benchmarks/Bench.scala
  32. +0 −63 test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Arrays.scala
  33. +0 −22 test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Dummy.scala
  34. +0 −68 test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/IntAccess.scala
  35. +0 −75 test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/ObjectAccess.scala
  36. +0 −39 test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Resetting.scala
  37. +0 −38 test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/UnknownManif.scala
  38. +0 −83 test/benchmarks/src/scala/collection/parallel/benchmarks/generic/Dummy.scala
  39. +0 −64 test/benchmarks/src/scala/collection/parallel/benchmarks/generic/Operators.scala
  40. +0 −362 test/benchmarks/src/scala/collection/parallel/benchmarks/generic/ParallelBenches.scala
  41. +0 −144 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTableSets.scala
  42. +0 −232 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTables.scala
  43. +0 −66 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Combine.scala
  44. +0 −54 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Construct.scala
  45. +0 −45 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Foreach.scala
  46. +0 −31 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/IntInit.scala
  47. +0 −51 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Iterate.scala
  48. +0 −57 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Lookup.scala
  49. +0 −87 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/MultipleCombine.scala
  50. +0 −180 test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala
  51. +0 −162 test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala
  52. +0 −13 test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Dictionary.scala
  53. +0 −66 test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Loader.scala
  54. +0 −58,111 test/benchmarks/src/scala/collection/parallel/benchmarks/misc/dict.txt
  55. +0 −39 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/AggregateLight.scala
  56. +0 −9 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Companion.scala
  57. +0 −21 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CopyToArray.scala
  58. +0 −47 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Corresponds.scala
  59. +0 −36 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountHeavy.scala
  60. +0 −22 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountLight.scala
  61. +0 −30 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala
  62. +0 −48 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/DiffHalf.scala
  63. +0 −47 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/DropMany.scala
  64. +0 −49 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ExistsLight.scala
  65. +0 −64 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FilterLight.scala
  66. +0 −52 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FindLight.scala
  67. +0 −24 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FlatMapLight.scala
  68. +0 −59 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallHeavy.scala
  69. +0 −46 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallLight.scala
  70. +0 −46 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallQuickStop.scala
  71. +0 −46 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallStop80k.scala
  72. +0 −45 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForeachHeavy.scala
  73. +0 −26 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForeachLight.scala
  74. +0 −45 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/GroupBy.scala
  75. +0 −47 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/IndexWhere.scala
  76. +0 −48 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/IntersectHalf.scala
  77. +0 −47 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/LastIndexWhere.scala
  78. +0 −27 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MapLight.scala
  79. +0 −84 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MatrixMultiplication.scala
  80. +0 −28 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MinLight.scala
  81. +0 −53 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PadToDouble.scala
  82. +0 −24 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PartialMapLight.scala
  83. +0 −61 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PartitionLight.scala
  84. +0 −46 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PatchHalf.scala
  85. +0 −29 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PlusPlus.scala
  86. +0 −22 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceHeavy.scala
  87. +0 −50 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceLight.scala
  88. +0 −53 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceList.scala
  89. +0 −30 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceNew.scala
  90. +0 −65 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReducePrime.scala
  91. +0 −44 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/RemoveDuplicates.scala
  92. +0 −127 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Resettable.scala
  93. +0 −35 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Reverse.scala
  94. +0 −48 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReverseMap.scala
  95. +0 −45 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SameElementsLong.scala
  96. +0 −46 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ScanLight.scala
  97. +0 −55 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ScanMedium.scala
  98. +0 −42 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SegmentLength.scala
  99. +0 −562 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala
  100. +0 −47 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceFew.scala
  101. +0 −47 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceMany.scala
  102. +0 −47 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceMedium.scala
  103. +0 −62 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SpanLight.scala
  104. +0 −47 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SplitHalf.scala
  105. +0 −28 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SumLight.scala
  106. +0 −47 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/TakeMany.scala
  107. +0 −61 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/TakeWhileLight.scala
  108. +0 −211 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_range/RangeBenches.scala
  109. +0 −51 test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_view/SeqViewBenches.scala
  110. +0 −253 test/benchmarks/src/scala/util/HashSpeedTest.scala
  111. +1 −1 test/disabled/coder/Coder.scala
  112. +1 −1 test/files/jvm/future-spec.check
  113. +1 −1 test/files/jvm/future-spec/FutureTests.scala
  114. +1 −1 test/files/jvm/scala-concurrent-tck.check
  115. +1 −1 test/files/jvm/scala-concurrent-tck.scala
@@ -91,7 +91,6 @@
<macrodef name="simple-javac">
<attribute name="project"/>
- <!-- project: forkjoin -->
<attribute name="args" default=""/>
<attribute name="jar" default="yes"/>
<sequential>
View
@@ -61,8 +61,4 @@ This license is used by the following third-party libraries:
* sizzle
* tools tooltip
-### Public Domain
-The following libraries are freely available in the public domain:
-
- * forkjoin
View
@@ -57,9 +57,3 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \'93AS IS\'9
\'95 jquery-layout\
\'95 sizzle\
\'95 tools tooltip\
-
-\fs30 \
-Public Domain\
-
-\fs26 The following libraries are freely available in the public domain:\
- \'95 forkjoin}
@@ -1 +0,0 @@
-ddd7d5398733c4fbbb8355c049e258d47af636cf ?forkjoin.jar
@@ -16,7 +16,7 @@ val meta =
ProjMeta(version = "2.12.0", projects = Seq(
Project("scala-library", "org.scala-lang",
Seq(ProjectRef("scala-library", "org.scala-lang")),
- Seq.empty), // TODO: forkjoin
+ Seq.empty),
Project("scala-reflect", "org.scala-lang",
Seq(ProjectRef("scala-reflect", "org.scala-lang")),
Seq(ProjectRef("scala-library", "org.scala-lang"))),
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../forkjoin">
- <sourceFolder url="file://$MODULE_DIR$/../forkjoin" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module>
@@ -8,7 +8,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="forkjoin" />
<orderEntry type="library" name="starr" level="project" />
</component>
</module>
@@ -36,7 +36,6 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/compiler.iml" filepath="$PROJECT_DIR$/compiler.iml" />
- <module fileurl="file://$PROJECT_DIR$/forkjoin.iml" filepath="$PROJECT_DIR$/forkjoin.iml" />
<module fileurl="file://$PROJECT_DIR$/interactive.iml" filepath="$PROJECT_DIR$/interactive.iml" />
<module fileurl="file://$PROJECT_DIR$/library.iml" filepath="$PROJECT_DIR$/library.iml" />
<module fileurl="file://$PROJECT_DIR$/manual.iml" filepath="$PROJECT_DIR$/manual.iml" />
@@ -8,7 +8,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="forkjoin" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="partest-extras" />
<orderEntry type="module" module-name="reflect" />
@@ -8,7 +8,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="forkjoin" />
<orderEntry type="module" module-name="interactive" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="partest-extras" />
@@ -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
- }
- }
-
-}
@@ -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 Global {
- val sz = 500000
- val data = (0 until sz) map { new Dummy(_) } toArray
-}
-
-
-import Global._
-
-
-object AVL 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 ImmutableTreeSet 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 JavaTreeSet 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
- }
- }
-
-}
@@ -1,73 +0,0 @@
-
-
-
-
-
-import collection.parallel.mutable.ParCtrie
-
-
-object Bfs extends testing.Benchmark {
- val length = sys.props("length").toInt
- val par = sys.props("par").toInt
-
- type Node = (Int, Int);
- type Parent = (Int, Int);
-
- def up(n: Node) = (n._1, n._2 - 1);
- def down(n: Node) = (n._1, n._2 + 1);
- def left(n: Node) = (n._1 - 1, n._2);
- def right(n: Node) = (n._1 + 1, n._2);
-
- // create a map and a target
- val target = (length / 2, length / 2);
- val map = Array.tabulate(length, length)((x, y) => (x % 3) != 0 || (y % 3) != 0 || (x, y) == target)
- def onMap(n: Node) = n._1 >= 0 && n._1 < length && n._2 >= 0 && n._2 < length
-
- // open and closed lists
- val open = ParCtrie[Node, Parent]()
- val closed = ParCtrie[Node, Parent]()
-
- collection.parallel.ForkJoinTasks.defaultForkJoinPool.setParallelism(par)
-
- override def setUp() {
- open.clear()
- closed.clear()
-
- // a couple of starting positions
- open((0, 0)) = null
- open((length - 1, length - 1)) = null
- open((0, length - 1)) = null
- open((length - 1, 0)) = null
- }
-
- def run() = {
- // greedy bfs path search
- while (open.nonEmpty && !open.contains(target)) {
- for ((node, parent) <- open) {
- def expand(next: Node) {
- if (onMap(next) && map(next._1)(next._2) && !closed.contains(next) && !open.contains(next)) {
- open(next) = node
- }
- }
- expand(up(node))
- expand(down(node))
- expand(left(node))
- expand(right(node))
- closed(node) = parent
- open.remove(node)
- }
- }
- }
-
- override def tearDown() {
- // print path
- var pathnode = open(target)
- while (closed.contains(pathnode)) {
- print(pathnode + "->")
- pathnode = closed(pathnode)
- }
- println()
- }
-
-}
-
@@ -1,21 +0,0 @@
-
-
-
-import collection.parallel.mutable.ParCtrie
-
-
-
-object Map extends testing.Benchmark {
- val length = sys.props("length").toInt
- val par = sys.props("par").toInt
- val parctrie = ParCtrie((0 until length) zip (0 until length): _*)
-
- parctrie.tasksupport = new collection.parallel.ForkJoinTaskSupport(new scala.concurrent.forkjoin.ForkJoinPool(par))
-
- def run = {
- parctrie map {
- kv => kv
- }
- }
-}
-
@@ -1,39 +0,0 @@
-
-
-
-
-
-import collection.parallel.mutable.ParCtrie
-
-
-case class Entry(num: Double) {
- var sqrt = num
-}
-
-
-object Nums extends testing.Benchmark {
- val length = sys.props("length").toInt
- val par = sys.props("par").toInt
- var entries: Seq[Entry] = null
- var results: ParCtrie[Double, Entry] = null
-
- collection.parallel.ForkJoinTasks.defaultForkJoinPool.setParallelism(par)
-
- override def setUp() {
- entries = (1 until length) map { num => Entry(num.toDouble) }
- results = ParCtrie()
- for (e <- entries) results += ((e.num, e))
- }
-
- def run() = {
- while (results.nonEmpty) {
- for ((num, e) <- results) {
- val nsqrt = 0.5 * (e.sqrt + e.num / e.sqrt)
- if (math.abs(nsqrt - e.sqrt) < 0.01) {
- results.remove(num)
- } else e.sqrt = nsqrt
- }
- }
- }
-}
-
@@ -1,37 +0,0 @@
-
-
-
-
-import collection.parallel.mutable.ParTrieMap
-
-
-
-object Size extends testing.Benchmark {
- val length = sys.props("length").toInt
- val par = sys.props("par").toInt
- var parctrie = ParTrieMap((0 until length) zip (0 until length): _*)
-
- //collection.parallel.ForkJoinTasks.defaultForkJoinPool.setParallelism(par)
- val ts = new collection.parallel.ForkJoinTaskSupport(new concurrent.forkjoin.ForkJoinPool(par))
- parctrie.tasksupport = ts
-
- def run = {
- parctrie.size
- }
-
- var iteration = 0
-
- override def tearDown() {
- iteration += 1
- if (iteration % 4 == 0) parctrie = ParTrieMap((0 until length) zip (0 until length): _*)
- parctrie.tasksupport = ts
- }
-
-}
-
-
-
-
-
-
-
Oops, something went wrong.

0 comments on commit a2973df

Please sign in to comment.