public
Description: Scala's benchmark suite library.
Homepage: http://scalalites.org/
Clone URL: git://github.com/rakuto/benchmark-suite.git
name age message
file .gitignore Loading commit data...
file AUTHOURS
file README
directory project/
directory src/
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