Skip to content
Find file
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
]
Something went wrong with that request. Please try again.