Cython implementation of mt_rand and mt_srand functions
Cython should be installed. Get it from your linux repository or install with easy_install/pip
easy_install Cython
OR
pip install Cython
Then install this package:
python setup.py install
$ time php test_rand.php
1706479894
real 0m39.513s
user 0m39.377s
sys 0m0.007s
$ time python test_mt_rand_speed.py
1706479894
real 0m18.820s
user 0m18.259s
sys 0m0.063s