I hereby claim:
- I am hsienchiaolee on github.
- I am kaidante (https://keybase.io/kaidante) on keybase.
- I have a public key ASBFipg0ptLW0OW8T3vdEsxHOxpMLJ7zkFn9A8iyR-j5yAo
To claim this, I am signing this object:
// Source: https://stackoverflow.com/questions/9160001/how-to-profile-methods-in-scala | |
def benchmark[R](runs: Int, block: => R) = { | |
def print_result(s: String, ns: Long) = { | |
val formatter = java.text.NumberFormat.getIntegerInstance | |
println("%-16s".format(s) + formatter.format(ns) + " ns") | |
} | |
var t0 = System.nanoTime() | |
var result = block // call-by-name | |
var t1 = System.nanoTime() |
I hereby claim:
To claim this, I am signing this object: