Skip to content

Use canonical representation for small integers #231

@lpereira

Description

@lpereira

Currently, CPython has only one representation for integers, which can hold arbitrarily long numbers. This simplifies things -- previous Python had two different integer objects, and implementing specialized opcodes would be quite a bit more laborious. Given that numbers that wouldn't fit in a machine register are far rarer than those that don't, it should be beneficial to using a more efficient representation for these "small" numbers.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions