Message105678
On Thu, May 13, 2010 at 5:58 PM, Mark Dickinson <report@bugs.python.org> wrote:
> Optimizations that speed up, say, factorial(n) for n <= 1000 would seem more valuable.
I am attaching a variant of my patch which precomputes partial
products that fit in 32 bit unsigned int. This results in speed up
over Daniel's code which varies from 1.8x for 20! down to 7% for 100!
and no measurable improvement for 1000!.
This optimization is orthogonal to the choice of partial_product
algorithm and can be easily extended on platforms with long long to
precompute 64 bit products. |
|
Date |
User |
Action |
Args |
2010-05-14 02:17:02 | belopolsky | set | recipients:
+ belopolsky, rhettinger, mark.dickinson, draghuram, stutzbach |
2010-05-14 02:17:00 | belopolsky | link | issue8692 messages |
2010-05-14 02:17:00 | belopolsky | create | |
|