Commits

Bryan O'Sullivan committed afc1e22

Benchmarks: add our friends (++) and show to the mix.

Comments (0)

Files changed (1)

benchmarks/Benchmarks.hs

        , bgroup "comparison" [
            bench "format1" $ nf (format "hi mom {}\n") (Only (pi::Double))
          , bench "printf1" $ nf (printf1 "hi mom %f\n") (pi::Double)
+         , bench "show1" $ nf (\d -> "hi mom " ++ show d ++ "\n") (pi::Double)
          , bench "format2" $ nf (format "hi mom {} {}\n") (pi::Double, "yeah"::T.Text)
          , bench "printf2" $ nf (printf2 "hi mom %f %s\n") (pi::Double, "yeah"::String)
+         , bench "show2" $ nf (\(d,s) -> "hi mom " ++ show d ++ " " ++ show s ++ "\n") (pi::Double, "yeah"::String)
          ]
        , bgroup "types" [
            bench "unit" $ nf (format "hi") ()