Boost logo

Boost Users :

Subject: Re: [Boost-users] [math] gamma distribution's quantile performance
From: John Maddock (john_at_[hidden])
Date: 2009-09-05 06:11:51


> Hi there, I have created a test which times the performance of
> boost::math::quantile( ... ) when using a gamma distribution. I ran it
> against source code we use here at work, for ages. It can be found
> here:
>
> http://people.sc.fsu.edu/~burkardt/cpp_src/dcdflib/dcdflib.html
>
> The old source code is about 2x times faster than the boost version.
>
> MS Visual Studio 2005:
> boost: 35.4sec
> att_bell:19sec
>
> Intel 11.1:
> boost: 21.4sec
> att_bell: 11.2sec
>
> Question is if there is a way to incorporate such a function into
> boost::math? As far, as I can tell the results are almost identical.

I'll need to investigate this some more and perhaps incorporate testing
dcdflib into my own test suite - however:

* I notice we're actually using the same algorithm internally, I'll need to
investigate the dcdflib code in more detail to figure out why it's faster,
but I suspect it may be down to what the chosen accuracy is.
* The Boost version is known to be robust and tested over a very wide range
of inputs, it produces accurate results even when the result is very small
or close to 1.
* The Boost version is ~twice as fast as the R lib version.

Of course #2 and #3 above may be of little consolation to you :-(

I'm going to be offline shortly for at least a couple of weeks (we have
builders coming in), but I'll try and get back to you on this then -
actually it might help if you file a bug report on the Trac at svn.boost.org
so I can't forget :-)

Cheers, John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net