mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
Add a benchmark for wrenCall().
This commit is contained in:
9
test/benchmark/api_call.wren
Normal file
9
test/benchmark/api_call.wren
Normal 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)")
|
||||
Reference in New Issue
Block a user