Scala's benchmark suite library.
Scala
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
project
src/main/scala Fix bug Mar 5, 2009
.gitignore
AUTHOURS First commit Mar 4, 2009
README

README

Simple benchmark suite library for Scala programmers.

Getting started:

 import org.scalalites.benchmark.Benchmark

 Benchmark.run("Benchmark of ack:") { b =>
   def ack(x: Int, y: Int): Int = x match {
     case 0 => y + 1
     case _ => y match { case 0 => ack(x - 1, 1); case _ => ack(x - 1, ack(x, y - 1))}
   }
   // run over the test named "ack(3, 2) x 50" 50 times
   b.report("ack(3, 4) x 10", 10)  { ack(3, 4) }

   // If you don't pass second argument run benchmark once.
   b.report("ack(3, 2)")  { ack(3, 2) }
 }
 
 // Output
 // Benchmark of ack:
 //  ack(3, 4) x 10 : 4.730000 sec (avg. 0.473000 sec)
 //  ack(3, 2) x 1  : 0.029000 sec