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:
@@ -1,4 +1,4 @@
|
||||
set(sources rbtree.kk nqueens.kk nqueens-int.kk cfold.kk deriv.kk)
|
||||
set(sources rbtree.kk nqueens.kk nqueens-int.kk cfold.kk deriv.kk fib.kk)
|
||||
|
||||
set(koka koka)
|
||||
|
||||
|
||||
13
koka_bench/koka/fib.kk
Normal file
13
koka_bench/koka/fib.kk
Normal file
@@ -0,0 +1,13 @@
|
||||
module nqueens
|
||||
import std/num/int32
|
||||
import std/os/env
|
||||
|
||||
|
||||
pub fun fib( n : int ) : div int
|
||||
match n
|
||||
0 -> 1
|
||||
1 -> 1
|
||||
x -> fib(x - 1) + fib(x - 2)
|
||||
|
||||
pub fun main()
|
||||
fib(get-args().head("").parse-int.default(30)).println
|
||||
Reference in New Issue
Block a user