diff options
Diffstat (limited to 'test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Arrays.scala')
-rw-r--r-- | test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Arrays.scala | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Arrays.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Arrays.scala deleted file mode 100644 index 39232122a9..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Arrays.scala +++ /dev/null @@ -1,63 +0,0 @@ -package scala.collection.parallel.benchmarks.arrays - - - - - - - -object Arrays { - - @inline def genericApply[T](xs: Array[T], idx: Int): T = xs.asInstanceOf[AnyRef] match { - case x: Array[AnyRef] => x(idx).asInstanceOf[T] - case _ => genericApplyNotAnyRef(xs, idx) - } - - @noinline private def genericApplyNotAnyRef[T](xs: Array[T], idx: Int): T = xs.asInstanceOf[AnyRef] match { - case x: Array[Int] => x(idx).asInstanceOf[T] - case x: Array[Double] => x(idx).asInstanceOf[T] - case x: Array[Long] => x(idx).asInstanceOf[T] - case x: Array[Float] => x(idx).asInstanceOf[T] - case x: Array[Char] => x(idx).asInstanceOf[T] - case x: Array[Byte] => x(idx).asInstanceOf[T] - case x: Array[Short] => x(idx).asInstanceOf[T] - case x: Array[Boolean] => x(idx).asInstanceOf[T] - case x: Array[Unit] => x(idx).asInstanceOf[T] - case null => throw new NullPointerException - } - - @inline def apply(xs: AnyRef, idx: Int): Any = xs match { - case x: Array[AnyRef] => x(idx).asInstanceOf[Any] - case _ => applyNotAnyRef(xs, idx) - } - - @noinline private def applyNotAnyRef(xs: AnyRef, idx: Int): Any = xs match { - case x: Array[Int] => x(idx).asInstanceOf[Any] - case x: Array[Double] => x(idx).asInstanceOf[Any] - case x: Array[Long] => x(idx).asInstanceOf[Any] - case x: Array[Float] => x(idx).asInstanceOf[Any] - case x: Array[Char] => x(idx).asInstanceOf[Any] - case x: Array[Byte] => x(idx).asInstanceOf[Any] - case x: Array[Short] => x(idx).asInstanceOf[Any] - case x: Array[Boolean] => x(idx).asInstanceOf[Any] - case x: Array[Unit] => x(idx).asInstanceOf[Any] - case null => throw new NullPointerException - } - -} - - - - - - - - - - - - - - - - |