Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 217 Bytes
module Main where
import Criterion.Main
fib :: Int -> Int
fib 0 = 0
fib 1 = 1
fib n = fib (n - 1) + fib (n - 2)
main :: IO ()
main = defaultMain
[ bench "fib 1" $ nf fib 1
, bench "fib 2" $ nf fib 2
]
You can’t perform that action at this time.