crafting-interpreters/lox/fibonacci_timed.lox

10 lines
154 B
Text
Raw Permalink Normal View History

2025-05-26 10:19:18 +02:00
fun fib(n) {
if (n < 2) return n;
return fib(n - 1) + fib(n - 2);
}
var before = clock();
print fib(40);
var after = clock();
print after - before;