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 pernici
Recipients mark.dickinson, pernici
Date 2008-09-24.15:57:52
SpamBayes Score 1.1174319e-05
Marked as misclassified No
Message-id <1222271875.08.0.260151907482.issue3944@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, I think that the speed-up is due to reducing the number of 
shifts and masks.

Changing PyLong_SHIFT to 16 would be complicated; for instance in 
v_iadd() carry could not be a digit of 16 bits anymore; writing code
specific for 64 bit machines would surely improve performance;
maybe with PyLong_SHIFT=30 few changes to the code would be needed?

I did not modify the case a = b.

I changed the documentation, which was wrong,
adding detailed bounds on carry
in the various steps to check that it does not overflow.
I corrected the wrong assertion (carry <= PyLong_MASK).
History
Date User Action Args
2008-09-24 15:57:55pernicisetrecipients: + pernici, mark.dickinson
2008-09-24 15:57:55pernicisetmessageid: <1222271875.08.0.260151907482.issue3944@psf.upfronthosting.co.za>
2008-09-24 15:57:54pernicilinkissue3944 messages
2008-09-24 15:57:53pernicicreate