Announce: mersenne-random 0.1, very fast pseudo-random number generation for Haskell

Hey all, I'm pleased to announce the creation of the mersenne-random package, The Mersenne twister is a pseudorandom number generator developed by Makoto Matsumoto and Takuji Nishimura, that provides for fast generation of very high quality pseudorandom numbers, suitable for simulators and monte carlo modelling. This library binds to 'SFMT', the SIMD-oriented Fast Mersenne Twister. SFMT is a variant of Mersenne Twister that is much faster than the original. It is designed to be fast when it runs on 128-bit SIMD. To compile in the vector instructions use Cabal, and pass '-f use_sse2' or '-f use_altivec' to configure, depend on which set your cpu supports (or none if it doesn't). The use of sse2 instructions will typically halve the generation time. The library is very fast (generation of Ints and Doubles will be some 50x faster than System.Random), but the implementation we bind to is heavily impure, so only a single generator is possible per-process (splitting generators is also not supported). Some light abstractions are implemented over the raw C interface, including a type class for SFMT-generated Haskell values, and lists of those values. Full 64 bit Ints and Doubles, and 53-bit precision Doubles, are supported on 64 bit machines. As usual, the stable branch is on hackage, so you can install it with cabal: $ cabal install mersenne-random Note that the cpu isn't detected automatically, so to turn on SIMD flags for your cpu, you'll need to build it by hand from: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mersenne-random And the darcs repo is at code.haskell.org, darcs get http://code.haskell.org/~dons/code/mersenne-random A test suite and example programs are provided. Enjoy, Don

Don Stewart wrote:
I'm pleased to announce the creation of the mersenne-random package,
Excellent! We were just discussing that.
...the implementation we bind to is heavily impure, so only a single generator is possible per-process (splitting generators is also not supported)... Note that the cpu isn't detected automatically, so to turn on SIMD flags for your cpu, you'll need to build it by hand
These are critical pieces of information. The only place I see them is in this email. Perhaps you should add them to the description on the Hackage page? Or at least to the README?
Some light abstractions are implemented over the raw C interface, including a type class for SFMT-generated Haskell values, and lists of those values.
Haddocks for this? Thanks, Yitz

gale:
Don Stewart wrote:
I'm pleased to announce the creation of the mersenne-random package,
Excellent! We were just discussing that.
...the implementation we bind to is heavily impure, so only a single generator is possible per-process (splitting generators is also not supported)... Note that the cpu isn't detected automatically, so to turn on SIMD flags for your cpu, you'll need to build it by hand
These are critical pieces of information. The only place I see them is in this email. Perhaps you should add them to the description on the Hackage page? Or at least to the README?
It is mentioned in the readme, and the cabal file.
Some light abstractions are implemented over the raw C interface, including a type class for SFMT-generated Haskell values, and lists of those values.
Haddocks for this?
It is fully haddocked, with examples. I'm waiting on hackage.haskell.org to regenerate the docs. Until then, docs are here: http://code.haskell.org/~dons/docs/mersenne-random/ -- Don
participants (2)
-
Don Stewart
-
Yitzchak Gale