Message82326
Here's a version of the patch that includes optimizations to
basecase multiplication, and a streamlined x_divrem for faster division.
With Victor's benchmark, I'm getting 43% speed increase on 64-bit
Linux/Core 2 Duo.
Note: the base patch is stable and ready for review; in contrast, the
optimizations are still in a state of flux, so the +optimizations
patch is just there as an example of what might be possible.
About using uint64_t:
the 64-bit type isn't really used very much: its main role is as the
result type of a 32-bit by 32-bit multiplication. So it might
not matter too much if it's an emulated type; what's
important is that the 32-bit by 32-bit multiply with 64-bit results
is done in a single CPU instruction. I don't know how to test for
this. Do you know of a mainstream system where this isn't true?
I'll test this tonight on 32-bit PPC and 32=bit Intel, and report back.
I don't care very much about trying to *automatically* do the right
thing for small or embedded systems: they can use the
--disable-big-digits configure option to turn 30-bit digits off.
Antoine, do you think we should be using 30-bit digits by default *only*
on 64-bit machines? I guess I could go with that, if it
can be manually overridden by the configure option. |
|
Date |
User |
Action |
Args |
2009-02-17 12:14:18 | mark.dickinson | set | recipients:
+ mark.dickinson, gregory.p.smith, pitrou, vstinner, christian.heimes |
2009-02-17 12:14:18 | mark.dickinson | set | messageid: <1234872858.19.0.692587004536.issue4258@psf.upfronthosting.co.za> |
2009-02-17 12:14:16 | mark.dickinson | link | issue4258 messages |
2009-02-17 12:14:14 | mark.dickinson | create | |
|