-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
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
Conversation
There was a problem hiding this 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
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). |
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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the inactivity here @dg-pb -- I just remembered this PR after someone was discussing the small integer cache.
I think we should add a news entry and then land this for 3.15. It's technically an internal-only change, but people do notice when things become immortal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good to me.
@Fidget-Spinner Are you happy with this?
Don't wait on me, I'm not blocking it! |
Uh oh!
There was an error while loading. Please reload this page.