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.

作者 mark.dickinson
收信人 fredrikj, loewis, mark.dickinson, rhettinger, terry.reedy, vstinner
日期 2008-12-13.13:10:05
SpamBayes Score 5.0144313e-06
Marked as misclassified
Message-id <1229173826.77.0.369626353113.issue3439@psf.upfronthosting.co.za>
In-reply-to
内容
Three files:
(1) bit_length7.patch just does the numbits->bit_length renaming;
    otherwise it's the same as numbits-6b.patch.
(2) bit_length7_opt.patch uses the fast bitcount method that Raymond
    pointed out.
(3) bit_length_pybench.patch adds a test for bit_length to pybench.

On my system (OS X 10.5.5/Core 2 Duo), on a 32-bit non-debug build of 
the trunk, pybench is showing me a 4-5% speedup for the optimized 
version.

(I also tried a version that uses gcc's __builtin_clzl function;  this 
was around 10% faster than the basic version, but of course it's not 
portable.)
历史
日期 用户 动作 参数
2008-12-13 13:10:26mark.dickinson修改recipients: + mark.dickinson, loewis, rhettinger, terry.reedy, vstinner, fredrikj
2008-12-13 13:10:26mark.dickinson修改messageid: <1229173826.77.0.369626353113.issue3439@psf.upfronthosting.co.za>
2008-12-13 13:10:10mark.dickinson链接issue3439 messages
2008-12-13 13:10:10mark.dickinson创建