{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigy5p6ilmxc6v5dckbb2hicllfg4u772rnsgmn4ife46uzrn6upay",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mixhxwt32ry2"
  },
  "path": "/t/why-not-use-smallcheck/13860?page=2#post_22",
  "publishedAt": "2026-04-07T21:25:55.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "turion:\n\n> For your specific example, for a threshold of 18, `tinycheck` finds the bug after less than 2 million (and more than 200 000) values, which takes 0.3 seconds on my machine. (1.4 seconds for a threshold of 20, still less than 2 million values.) I agree that this is probably less performant than QuickCheck, but still I find it noteable. I achieved it by just writing down the basic idea behind SmallCheck from memory in little time as a library. This says something about the power of the idea.\n\nYou asked me about SmallCheck, not about your library. Here is a test suite I based my previous answer on:\n\n\n    #!/usr/bin/env cabal\n    {- cabal:\n    build-depends: base, tasty, tasty-smallcheck\n    default-language: GHC2021\n    -}\n\n    import Test.Tasty\n    import Test.Tasty.SmallCheck\n    import Data.List (sort)\n\n    main = defaultMain $\n      -- depth 19 means that we are building lists of length 0..18\n      localOption (SmallCheckDepth 19) $\n        testProperty \"mySort matches the reference implementation\" $\n          \\xs -> mySort xs == sort xs\n\n    mySort :: [Int] -> [Int]\n    mySort xs\n      | length xs < 18 = sort xs\n      | otherwise = error \"explode\"\n\n\nThis completed ~65000 of tests in 10 minutes on my machine and does not seem to be anywhere near the counterexample. If your library completes 200000+ tests in 0.3 seconds (which is roughly 6000 times faster), that’s a great result, but it does not relate to SmallCheck.",
  "title": "Why not use smallcheck?"
}