rubyx/test/bench/c/calls.c
Torsten 8eb0ba0d81 fix benchmarks
up to 20 recursive fibo
had mixed add and calls for rubyx
2019-07-30 21:16:24 +03:00

19 lines
222 B
C

#include<stdio.h>
int fibo_r(int n)
{
if ( n < 2 )
return n;
else
return ( fibo_r(n-1) + fibo_r(n-2) );
}
int main(void)
{
int counter = 1000;
int fib ;
while(counter--) {
fib += fibo_r(20);
}
}