diff options
Diffstat (limited to 'test/benchmark/sources/sort1')
-rw-r--r-- | test/benchmark/sources/sort1/build.xml | 36 | ||||
-rw-r--r-- | test/benchmark/sources/sort1/sort1.scala | 28 |
2 files changed, 0 insertions, 64 deletions
diff --git a/test/benchmark/sources/sort1/build.xml b/test/benchmark/sources/sort1/build.xml deleted file mode 100644 index 31f48144cf..0000000000 --- a/test/benchmark/sources/sort1/build.xml +++ /dev/null @@ -1,36 +0,0 @@ -<project name="sort1" default="run"> - - <import file="../../predef.xml"/> - - <target name="init"> - <mkdir dir="${benchmark.classes.dir}/${ant.project.name}"/> - </target> - - <!-- Compile the sort1 benchmark without optimizations --> - <target name="compile-noopt" - description="Compile the ${ant.project.name} benchmark with no optimizations"> - <compile-benchmark files="${benchmark.sources.dir}/${ant.project.name}/sort1.scala" - destination="${benchmark.classes.dir}/${ant.project.name}/noopt"/> - </target> - - <!-- Compile the sort1 benchmark with optimizations --> - <target name="compile-opt" - description="Compile the ${ant.project.name} benchmark with opt"> - <compile-benchmark files="${benchmark.sources.dir}/${ant.project.name}/sort1.scala" - destination="${benchmark.classes.dir}/${ant.project.name}/opt" - additionalArgs="-separate:no -Xinline"/> - </target> - - - <target name="run" depends="init,compile-noopt,compile-opt" - description="Run this benchmark"> - <run-benchmark location="${benchmark.classes.dir}/${ant.project.name}/noopt"/> - <run-benchmark location="${benchmark.classes.dir}/${ant.project.name}/opt"/> - </target> - - <target name="clean.benchmark" - description="Clean the object files for ${ant.project.name} benchmark"> - <delete dir="${benchmark.classes.dir}/${ant.project.name}"/> - </target> - -</project> diff --git a/test/benchmark/sources/sort1/sort1.scala b/test/benchmark/sources/sort1/sort1.scala deleted file mode 100644 index 6795158a78..0000000000 --- a/test/benchmark/sources/sort1/sort1.scala +++ /dev/null @@ -1,28 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala benchmark suite ** -** / __/ __// _ | / / / _ | (c) 2003-2004, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -** $Id$ -\* */ - - -package benchmarks; - -/** Quick sort with a functional taste. */ -object sort1 with scala.testing.Benchmark { - - def sort(a: List[Int]): List[Int] = { - if (a.length < 2) - a - else { - val pivot = a(a.length / 2); - sort(a.filter(x => x < pivot)) - ::: a.filter(x => x == pivot) - ::: sort(a.filter(x => x > pivot)) - } - } - - def run: Unit = sort(List.range(1, 10000)); -} |