fix: add explicit return statements in benchmark functions and add method_call benchmark suite

This commit is contained in:
Bob Nystrom
2013-12-08 02:43:39 +00:00
parent ffc58724d7
commit 6ba77ea2cd
8 changed files with 369 additions and 17 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
var fib = fn(n) {
if (n < 2) {
n
} else {
fib.call(n - 1) + fib.call(n - 2)
return n
}
return fib.call(n - 1) + fib.call(n - 2)
}
var start = OS.clock