mirror of
https://github.com/MorizzG/MLox.git
synced 2025-12-06 04:22:41 +00:00
moved benchmark lox files to separate folder
This commit is contained in:
parent
b4e25ee561
commit
29431d0cdb
13 changed files with 344 additions and 302 deletions
8
benchmark/fib.lox
Normal file
8
benchmark/fib.lox
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fun fib(n) {
|
||||
if (n < 2) return n;
|
||||
return fib(n - 2) + fib(n - 1);
|
||||
}
|
||||
|
||||
// var start = clock();
|
||||
print fib(35); // expect: 9227465
|
||||
// print clock() - start;
|
||||
|
|
@ -3,6 +3,4 @@ fun fib(n) {
|
|||
return fib(n - 2) + fib(n - 1);
|
||||
}
|
||||
|
||||
var start = clock();
|
||||
print fib(35) == 9227465;
|
||||
print clock() - start;
|
||||
print fib(35); // expect: 9227465
|
||||
634
lox.t/run.t
634
lox.t/run.t
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue