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 stutzbach
Recipients belopolsky, draghuram, mark.dickinson, rhettinger, stutzbach
Date 2010-05-13.22:09:05
SpamBayes Score 0.00553642
Marked as misclassified No
Message-id <>
Speaking of getting side-tracked, I didn't see an answer to a question I asked earlier.  I'd like to get some feedback before I proceed with revising the patch.

For the find-last-set-bit (to replace log2) and count-set-bits operations, would it be worthwhile to create a pybits.h and .c that defines _Py_FindLastSetBit and _Py_CountSetBits? (with appropriate logic in the .h and to use system/compiler versions if available)

There are already two implementations of find-last-set-bit in Python:
bits_in_digit() in Objects/longobject.c and hi0bits() in Python/dtoa.c, which I could consolidate.

Alternately, I could just add static functions to mathmodule.c with the simplest possible implementation (they're only called once per factorial, so the performance impact is minimal).
Date User Action Args
2010-05-13 22:09:07stutzbachsetrecipients: + stutzbach, rhettinger, mark.dickinson, belopolsky, draghuram
2010-05-13 22:09:07stutzbachsetmessageid: <>
2010-05-13 22:09:06stutzbachlinkissue8692 messages
2010-05-13 22:09:05stutzbachcreate