Add a benchmark for wrenCall().

This commit is contained in:
Bob Nystrom
2015-12-23 17:29:53 -08:00
parent b7e62926ab
commit 15043b897f
6 changed files with 76 additions and 3 deletions

View File

@ -0,0 +1,9 @@
class Benchmark {
foreign static call(iterations)
}
var result = Benchmark.call(1000000)
// Returns false if it didn't calculate the right value. Otherwise returns the
// elapsed time.
System.print(result is Num)
System.print("elapsed: %(result)")