Skip to content

Commit

Permalink
Add benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Apr 16, 2017
1 parent c5d2967 commit baf17d4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions benchmark/Main.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
-- You can benchmark your code quickly and effectively with Criterion. See its
-- website for help: <http://www.serpentine.com/criterion/>.
-- You can benchmark your code quickly and effectively with Criterion.
-- See its website for help: <http://www.serpentine.com/criterion/>.
import Criterion.Main

import WaveToy1

default (Int)

main :: IO ()
main = defaultMain [bench "const" (whnf const ())]
main = defaultMain [
-- bgroup "Grid" [bench "init" $ nf (initGrid (0.0::Double) (0.0, 1.0)) 1001]
bgroup "Grid" [bench "init" $
whnf (\np -> let g = initGrid (0.0::Double) (0.0, 1.0) np
in energyGrid g) 1001]
]

0 comments on commit baf17d4

Please sign in to comment.