[issue46407] optimizing `1 << n` or `2 ** n` and modulo-only operations

theeshallnotknowethme report at bugs.python.org
Mon Jan 17 07:11:25 EST 2022


theeshallnotknowethme <nohackingofkrowten at gmail.com> added the comment:

> Another option to consider would be a table lookup of a pre-computed table of [1 << i for i in range(64)].
Does it have a significantly better performance compared to not having a table lookup?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46407>
_______________________________________


More information about the Python-bugs-list mailing list