[Numpy-discussion] Using logfactorial instead of loggamma in random_poisson sampler
kevin.k.sheppard at gmail.com
Mon Mar 8 11:43:26 EST 2021
I did a quick test and using random_loggam was about 6% faster than using
logfactorial (on Windows).
On Sun, Mar 7, 2021 at 2:40 AM Robert Kern <robert.kern at gmail.com> wrote:
> On Sat, Mar 6, 2021 at 1:45 PM Warren Weckesser <
> warren.weckesser at gmail.com> wrote:
>> At the time, making that change was not a high priority, so I didn't
>> pursue it. It does make sense to use the logfactorial function there,
>> and I'd be happy to see it updated, but be aware that making the
>> change is more work than changing just the function call.
> Does it make a big difference? Per NEP 19, even in `Generator`, we do
> weigh the cost of changing the stream reasonably highly. Improved accuracy
> is likely worthwhile, but a minor performance improvement is probably not.
> Robert Kern
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion