Mersenne Twister in Assembler/DLL
Return to Versions of MT
Sterling Stuart Stein (S-cubed)
wrote a direct translation of MT19937
in MASM version 6. Here is the zip code of 2002/Jan/2 version:
This code is twice faster than its original zrand.zip
wrote a NASM (a free assembler for Linux) version of MT19937.
Explanation is in Japanese
but the code is in English there. Here is corresponding
The length of the executable code is only 256 bytes!
(But the speed is not optimized).
ported MT19937 to bash.
Here is a .tar.gz file.
implemented seven different random number generators including
MT19937 in a DLL.
, and here is
In the documentation, there is a comparison of run-time,
results of statistical tests, etc.
wrote a thread-safe
DLL version of MT.
His home page
includes a DLL version as well as a thread-safe version,
and a Makefile for Borland C++ Compiler 5.5.
This page also includes MT19937ar.c (
improved initialization version,
2002/1/26) and its Cokus-type speed-up version
MT19937ar-cok.c, and show a comparison of speed.
Japanese home page
is also available. And here is his code and dll
in zip file.
- Matthew Bellew implemented MT in
(July 2000)(modified May 2006).
Agner Fog distributes a bunch of modern generators including mt19937ar.c
(improved initialization version,
2002/1/26)in C++ and Assembler,
for uniform and non-uniform random number generation. The code is very well optimized.