[New-bugs-announce] [issue31031] Unify duplicate bits_in_digit and bit_length

Niklas Fiekas report at bugs.python.org
Tue Jul 25 08:48:04 EDT 2017


New submission from Niklas Fiekas:

My previous patch to optimize bits_in_digit was
rejected: http://bugs.python.org/issue29782

This leaves this issue open (mathmodule.c):

/* XXX: This routine does more or less the same thing as
 * bits_in_digit() in Objects/longobject.c.  Someday it would be nice to
 * consolidate them.  On BSD, there's a library function called fls()
 * that we could use, and GCC provides __builtin_clz().
 */

We could still deal with the code duplication without the
complexity of the optimizations in the previous patch.

----------
components: Interpreter Core
messages: 299069
nosy: louielu, mark.dickinson, niklasf
priority: normal
severity: normal
status: open
title: Unify duplicate bits_in_digit and bit_length
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31031>
_______________________________________


More information about the New-bugs-announce mailing list