commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikkel Meyer Andersen (JIRA)" <>
Subject [jira] [Commented] (MATH-585) Very slow generation of gamma random variates
Date Thu, 09 Jun 2011 13:08:59 GMT


Mikkel Meyer Andersen commented on MATH-585:

Just for your info: I'm working on implementing the methods described in the papers, and they
are not too difficult. I need to do some cleaning, and then I'll upload a patch within a few
weeks. Current status of a test run:

Generating 1000000 random gamma with mean 57.19 and var 245.91699999999997
nextGamma done
nextGamma took 23698.0 ms. with mean 57.17778720638469 and var 246.443482942482
nextNewGamma done
nextNewGamma took 230.0 ms. with mean 57.20940243394036 and var 245.80250080092702

So the performance gain is around 100 which isn't too bad :-).

> Very slow generation of gamma random variates
> ---------------------------------------------
>                 Key: MATH-585
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 2.2, 3.0
>         Environment: All
>            Reporter: Darren Wilkinson
>              Labels: Gamma, Random
>   Original Estimate: 6h
>  Remaining Estimate: 6h
> The current implementation of gamma random variate generation works, but uses an inversion
method. This is well-known to be a bad idea. Usually a carefully constructed rejection procedure
is used. To give an idea of the magnitude of the problem, the Gamma variate generation in
Parallel COLT is roughly 50 times faster than in Commons Math. 

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message