Mark Dickinson <dicki...@gmail.com> added the comment: I think I've found the happy medium:
bit_length7_opt2.patch achieves nearly the same performance gains as bit_length7_opt.patch (around 7% for uniformly-distributed inputs, 3.5% for uniformly-distributed outputs), but is much more straightforward and readable. It's pretty much what Raymond suggested in the first place, plus a table lookup. Added file: http://bugs.python.org/file12342/bit_length7_opt2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3439> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com