Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (15 sloc) 494 Bytes
{-# LANGUAGE ForeignFunctionInterface #-}
module Main where
import Foreign.C.Types
import Criterion.Main
import Smallpt.Mutable
import Smallpt.Storable
import Smallpt.Unboxed
foreign import ccall unsafe "smallpt"
c_smallpt :: CInt -> CInt -> CInt -> IO ()
main = defaultMain
-- [ bench "c++" $ c_smallpt 20 20 8
[ bench "mutable" $ Smallpt.Mutable.smallpt 20 20 8 ]
-- , bench "storable" $ Smallpt.Storable.smallpt 20 20 8
-- , bench "unboxed" $ Smallpt.Unboxed.smallpt 20 20 8
-- ]