Skip to content

gh-133059: Increase _PY_NSMALLPOSINTS size #133160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dg-pb
Copy link
Contributor

@dg-pb dg-pb commented Apr 29, 2025

@ZeroIntensity ZeroIntensity added the performance Performance or resource usage label Apr 29, 2025
Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me (nice analysis in the issue!) but let's let other performance dedicated folks weigh in

@Fidget-Spinner
Copy link
Member

Fidget-Spinner commented Jun 18, 2025

I'm overall in favour of doing this. Though I wonder if there will be code that relies on the fact that ints between -x to 256 are cached and everything else isn't. I'm somewhat worried some weird code out there relying on the current int interning will break. Does anyone know?

(This includes both C API code and Python code).

@ericsnowcurrently
Copy link
Member

I'm somewhat worried some weird code out there relying on the current int interning will break.

IMHO, at a certain point we can't accommodate every way people might rely on some implementation detail. In this specific case we've been fairly clear in documentation (and elsewhere) about not relying on identity. We'll also point out the change in the release notes. Again IMHO, as long as are thoughtful about impact, we should expect that users (taking advantage of impl-specific details like this) take responsibility for adjusting their own code. "We're all consenting adults."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting merge performance Performance or resource usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants