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
@@ -106,7 +106,7 @@ struct _Py_cached_objects {
};

// These would be in pycore_long.h if it weren't for an include cycle.
#define _PY_NSMALLPOSINTS 257
#define _PY_NSMALLPOSINTS 1025
#define _PY_NSMALLNEGINTS 5
Copy link
Contributor

Choose a reason for hiding this comment

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

How about negative integers?

Copy link
Contributor Author

@dg-pb dg-pb Apr 30, 2025

Choose a reason for hiding this comment

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

Someone could indeed explore that too, but probability that it turns out that there is significant evidence to increase it is not very high.

See initial findings at faster-cpython/ideas#725 (comment)

And also, very first graph in #133059 (comment) does include negatives too. It can not be seen clearly in the graph, but there are 193 below -5, while total is 117556.

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

Successfully merging this pull request may close these issues.

3 participants