lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Jan 22, 2012 at 07:06, Francesco Abbate <francesco.bbt@gmail.com> wrote:
>> Does math.random use the same algorithm as the one used by C-code?
>
> Hi Leo,
>
> as far as I know the algorithms are similar bot not identical. Some
> details about the TAUS2 algorithm used in he GSL library can be found
> here:
>
> http://www.nongnu.org/gsl-shell/doc/random.html
>

Francesco,
could you generate 1E9 random numbers using math.random in LuaJIT and
compare it with the time it takes generating 1E9 random numbers by the
C-code. Differences in RNG performance might shed some light on VEGAS
performance in both cases.

LuaJIT2 based GNU Shell is becoming a very nice tool for numeric analysis.
Thank you very much for your efforts!!

--Leo--