Looks like JavaScript, feels like Ruby, and it is a script language fitting in C programmers.
This project is maintained by Kray-G
This markdown document is another example of SpecTest. Although there is overhead to run the script, SpecTest can measure the running time. This means it can be an easy benchmark system.
To change the interpreter per test code, add (interpreter)
name after the subject of #### Code
like examples below.
To run this benchmark, do the command below under the root of Kinx repository.
$ ./kinx --exec:spectest -v -f doc/benchmark/.spectest
Note that Ruby and Python must be installed and the path for all interpreters must be set, to run this benchmark.
native fib(n) {
if (n < 3) return n;
return fib(n-2) + fib(n-1);
}
System.println(fib(34));
9227465
function fib(n) {
if (n < 3) return n;
return fib(n-2) + fib(n-1);
}
System.println(fib(34));
9227465
def fib(n)
if n < 3
return n;
else
return fib(n-2) + fib(n-1);
end
end
puts fib(34)
9227465
import sys
def fib(n):
if n < 3:
return n
else:
return fib(n-1) + fib(n-2)
print fib(int(34))
9227465