[QuickCheck] [PATCH] Fix a performance issue
Nick Smallbone
nick.smallbone at gmail.com
Tue Feb 5 17:02:43 GMT 2013
Thanks Simon! I've adapted your patch slightly and pushed it.
Nick
On 18 November 2012 15:09, Simon Hengel <sol at typeful.net> wrote:
> Hi,
> here are the numbers.
>
> Without producing any output:
>
> -- file main.hs
> main = replicateM_ 100 . (quickCheckWith stdArgs {chatty = False}) $
> \x y -> x /= y ==> x /= (y :: Int)
>
> $ ghc main.hs && time ./main
> real 0m0.851s
> user 0m0.844s
> sys 0m0.008s
>
>
> QuickCheck's current default behavior:
>
> -- file main.hs
> main = replicateM_ 100 . quickCheck $
> \x y -> x /= y ==> x /= (y :: Int)
>
> $ ghc main.hs && time ./main
> real 0m6.650s
> user 0m1.940s
> sys 0m2.404s
>
>
> QuickCheck's default behavior with my patch:
>
> real 0m1.697s
> user 0m1.088s
> sys 0m0.132s
>
> I hope it is obvious how to interpret this.
>
> The solution was pointed out by parcs in a comment to GHC #7418 [1].
>
> Cheers,
> Simon
>
> [1] http://hackage.haskell.org/trac/ghc/ticket/7418#comment:1
>
> _______________________________________________
> QuickCheck mailing list
> QuickCheck at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/quickcheck
More information about the QuickCheck
mailing list