Groovy Speed 3 - Groovin' with Groovy
benchmark = { n, closure |
    start = System.currentTimeMillis()
    n.times { closure.call }
    delta = System.currentTimeMillis() - start
    ((float)delta) / n
}

def fact(n) {
  (2..n).inject(1) { f, i | f * i }
}

t = benchmark(1000) { fact(10) }
println "Groovy: ${1000*t} MicroSeconds per call"
Groovy: 919.0 MicroSeconds per call