summaryrefslogtreecommitdiff
path: root/test/benchmark/sources/sort2/sort2.scala
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2005-12-16 18:20:15 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2005-12-16 18:20:15 +0000
commit17e2b1c2a6f69ba74e79c30d1e44195fe732e3e3 (patch)
treebb804b4038eb6d0dee58b77cea8bd2dcc6f42dc4 /test/benchmark/sources/sort2/sort2.scala
parente70a1a24ef7a7b596a92e1853fd44e96f36ad245 (diff)
downloadscala-17e2b1c2a6f69ba74e79c30d1e44195fe732e3e3.tar.gz
scala-17e2b1c2a6f69ba74e79c30d1e44195fe732e3e3.tar.bz2
scala-17e2b1c2a6f69ba74e79c30d1e44195fe732e3e3.zip
Removed old scala tests from new Scala core mod...
Removed old scala tests from new Scala core module.
Diffstat (limited to 'test/benchmark/sources/sort2/sort2.scala')
-rw-r--r--test/benchmark/sources/sort2/sort2.scala35
1 files changed, 0 insertions, 35 deletions
diff --git a/test/benchmark/sources/sort2/sort2.scala b/test/benchmark/sources/sort2/sort2.scala
deleted file mode 100644
index 6c024eab7a..0000000000
--- a/test/benchmark/sources/sort2/sort2.scala
+++ /dev/null
@@ -1,35 +0,0 @@
-/* __ *\
-** ________ ___ / / ___ Scala benchmark suite **
-** / __/ __// _ | / / / _ | (c) 2003-2004, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
-** /____/\___/_/ |_/____/_/ | | **
-** |/ **
-** $Id$
-\* */
-
-package benchmarks;
-
-/** Quick-sort a list of integers, version 2. Taken from the
- Scala distribution examples. */
-class Sorter {
-
- def sort(a: List[Int]): List[Int] = {
- if (a.length < 2)
- a
- else {
- val pivot = a(a.length / 2);
- def lePivot(x: Int) = x < pivot;
- def gtPivot(x: Int) = x > pivot;
- def eqPivot(x: Int) = x == pivot;
- sort(a filter lePivot)
- ::: sort(a filter eqPivot)
- ::: sort(a filter gtPivot)
- }
- }
-
-}
-
-object sort2 extends Sorter with scala.testing.Benchmark {
- def run: Unit = sort(List.range(1,10000));
-
-}