-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random generation is very slow #234
Comments
Something is weird; when I last time benchmarked
|
Using I'm now trying out to work around this slowness by using
Hmm, let me give that a "quick check". |
@nh2 could you try this haskellari/qc-instances@master...phadej:faster-bytestring version of In the simple benchmark there, it was already 20x faster. (I'll resort to |
I think that the best place to fix this particular problem is in the More generally, there are a couple of things that might cause
|
Just a thought, but generating infinite structures only works when the bottom of the monad stack is Identity, right? If so, perhaps it's worth considering StateT over splitting(?) |
https://hackage.haskell.org/package/quickcheck-instances-0.3.20 released with faster |
Seeing as this was fixed in |
For testing my binding to the
lz4
compression library (https://github.com/nh2/lz4-frame-conduit), I need to generate a lot of largeByteString
s.Unfortunately I can barely use quickcheck for this, because its random generator is too slow.
random
only generates only 5-8 MB/s (Very low throughput haskell/random#51)tf-random
generates 3-8 MB/s in the same testWhen actually generating
ByteStrings
usingquickcheck-instances
andsize = 1000
on e.g.it generates me 1 MB/s; generating
[String]
is only slightly faster.These numbers are very low compared to the 230 MB/s
/dev/urandom
gets me on the same machine.Can we do something about it?
The text was updated successfully, but these errors were encountered: