This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients christian.heimes, gregory.p.smith, mark.dickinson, pitrou, vstinner
Date 2009-02-17.12:14:08
SpamBayes Score 1.8297953e-07
Marked as misclassified No
Message-id <>
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:18mark.dickinsonsetrecipients: + mark.dickinson, gregory.p.smith, pitrou, vstinner, christian.heimes
2009-02-17 12:14:18mark.dickinsonsetmessageid: <>
2009-02-17 12:14:16mark.dickinsonlinkissue4258 messages
2009-02-17 12:14:14mark.dickinsoncreate