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 <rep...@bugs.python.org> <http://bugs.python.org/issue31031> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com