3 ms·
> And there's no reason you couldn't use QuickCheck to verify a performance law, by the way. In fact, I've done something similar to this.
by dllthomas 10y ago
> And there's no reason you couldn't use QuickCheck to verify a performance law, by the way.
In fact, I've done something similar to this.
- taeric 10y agoI'd be interested in seeing how you did this.
- dllthomas 10y agoMore precisely what I did was minimization on an unusually slow example input, but I don't think I can share the code. The approach generalizes, though: To verify performance, you would set it up to benchmark the code in question (in Haskell, this would probably mean using Criterion) and then assert that it was "fast enough" (probably relative to the size of the input).