Move kraken,scheme,python,cpp fib tests over to koka_bench, add WAVM as a tested compiler backend for the Kraken benchmarks
This commit is contained in:
17
koka_bench/cpp/fib.cpp
Normal file
17
koka_bench/cpp/fib.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
|
||||
int fib(int n) {
|
||||
if (n == 0) {
|
||||
return 1;
|
||||
} else if (n == 1) {
|
||||
return 1;
|
||||
} else {
|
||||
return fib(n-1) + fib(n-2);
|
||||
}
|
||||
}
|
||||
int main(int argc, char **argv) {
|
||||
printf("%d\n", fib(atoi(argv[1])));
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user