rubyx/test/bench/adds.c
Torsten Ruger 96972dab29 thats most of the benchmarking
strange about the puts in soml, hard to see where a factor of 10 would
come from
2015-11-20 23:51:58 +02:00

28 lines
339 B
C

#include<stdio.h>
int fibo(int n){
int result;
int a = 0;
int b = 1;
int i = 1;
while( i < n )
{
result = a + b;
a = b;
b = result;
i++;
}
return result;
}
int main(void)
{
int counter = 98304 + 1696;
int counter2 = counter;
int level = 40;
int fib ;
while(counter--) {
fib = fibo(level);
}
}