Skip to content

Micro-optimization of small integer lookup #93325

Closed as not planned
Closed as not planned
@eendebakpt

Description

@eendebakpt

Feature or enhancement

The small integer lookup method get_small_int is using _PyLong_SMALL_INTS as a pointer to the small integers. This requires adding the constant _PY_NSMALLNEGINTS to the integer desired. By creating a pointer to the small integer 0 we can avoid the addition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usagetype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions