[New-bugs-announce] [issue44946] Integer operations are inefficient for "medium" integers.

Mark Shannon report at bugs.python.org
Wed Aug 18 06:25:32 EDT 2021


New submission from Mark Shannon <mark at hotpy.org>:

"Medium" integers are those with a single internal digit or zero.
Medium integers are integers in the range -2**30 to +2**30 on 64 bit machines.
"Small" integers, -5 to 256 are cached, but are represented as medium integers internally.

To a good approximation, all integers are "medium".

However, we make little effort to exploit that fact in the code for binary operations, which are very common operations on integers.

----------
components: Interpreter Core
messages: 399832
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Integer operations are inefficient for "medium" integers.
type: performance

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


More information about the New-bugs-announce mailing list