[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: VEGAS algorithm for monte carlo integration in LuaJIT2
- From: Leo Razoumov <slonik.az@...>
- Date: Sun, 22 Jan 2012 11:52:06 -0500
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--