Permalink
Browse files

Benchmark: Add getMesh/getContour benchmarks

  • Loading branch information...
1 parent 161006d commit e55fc7c80059b9d5591dfd9b6318982daf66a2f9 @bgamari bgamari committed Dec 11, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 Benchmark.hs
View
@@ -1,5 +1,7 @@
import Criterion.Main
import Graphics.Implicit
+import Graphics.Implicit.Export.SymbolicObj2
+import Graphics.Implicit.Export.SymbolicObj3
import Graphics.Implicit.Primitives
obj2d_1 :: SymbolicObj2
@@ -39,13 +41,15 @@ obj2Benchmarks name obj =
bgroup name
[ bench "SVG write" $ writeSVG 1 "benchmark.svg" obj
, bench "PNG write" $ writePNG2 1 "benchmark.png" obj
+ , bench "Get contour" $ nf (symbolicGetContour 1) obj
]
obj3Benchmarks :: String -> SymbolicObj3 -> Benchmark
obj3Benchmarks name obj =
bgroup name
[ --bench "PNG write" $ writePNG3 1 "benchmark.png" obj
bench "STL write" $ writeSTL 1 "benchmark.stl" obj
+ , bench "Get mesh" $ nf (symbolicGetMesh 1) obj
]
benchmarks =

0 comments on commit e55fc7c

Please sign in to comment.