- breaking change to
randomIValInteger
to improve RNG quality and performance see #4 and ghc https://ghc.haskell.org/trac/ghc/ticket/8898 - correct documentation about generated range of Int32 sized values of type Int #7
- fix memory leaks by using strict fields and strict atomicModifyIORef' #8 related to ghc trac tickets #7936 and #4218
- support for base < 4.6 (which doesnt provide strict atomicModifyIORef') and integrating Travis CI support. #12
- fix C type in test suite #9
bump for overflow bug fixes
bump for ticket 8704, build fusion
bump for bug fixes,
bumped version for float/double range bugfix
- Breaking change which mostly maintains backwards compatibility.
- Support for monadic generators e.g. mwc-random.
- Monadic adapters for pure generators (providing a uniform monadic interface to pure and monadic generators).
- Faster by more x10 (depending on the type) - see below for benchmarks.
- Passes a large number of random number test suites:
- dieharder
- TestU01 (SmallCrush, Crush, BigCrush)
- PractRand
- gjrand
- See random-quality for details on how to do this yourself.
- Better quality split as judged by these tests. Again see random-quality for details on how to do this yourself.
- Unbiased generation of ranges.
- Updated tests and benchmarks.
- Continuous integration.
- Fully documented - for more details see the haddock.
- These are not percentage (%) increases. Random
Int
s are produced 48.9 times faster! - The only type for which generation is slower is for
Integer
s (on ranges); in the version 1.1 the generation forInteger
was biased.
|----------|----------------|----------------|----------------------|
| Type | Cycles/Int 1.1 | Cycles/Int 1.2 | Performance Increase |
|----------|----------------|----------------|----------------------|
| Ints | 1508 | 30.84 | 48.9 |
| Word16 | 495 | 30.88 | 16.0 |
| Floats | 1036 | 35.11 | 29.5 |
| CFloats | 1054 | 33.75 | 31.2 |
| Doubles | 1875 | 35.77 | 52.4 |
| CDoubles | 908 | 33.31 | 27.3 |
| Integers | 1578 | 33.09 | 47.7 |
| Bools | 698 | 36.15 | 19.3 |
| Chars | 693 | 57.6 | 12.0 |
|----------|----------------|----------------|----------------------|
|--------------|----------------|----------------|----------------------|
| Type | Cycles/Int 1.1 | Cycles/Int 1.2 | Performance Increase |
|--------------|----------------|----------------|----------------------|
| Ints | 734 | 102 | 7.2 |
| Word16s | 748 | 115 | 6.5 |
| Floats | 2055 | 35.88 | 57.3 |
| CFloats | 1071 | 34.96 | 30.6 |
| Doubles | 3050 | 35.89 | 85.0 |
| CDoubles | 1112 | 34.87 | 31.9 |
| Integers | 534 | 868 | 0.6 |
| Bools | 739 | 35.22 | 21.0 |
| Chars | 790 | 133 | 5.9 |
| BIG Integers | 199848 | 103056 | 1.9 |
|--------------|----------------|----------------|----------------------|