FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-46841: Use inline caching for calls by brandtbucher · Pull Request #31709 · python/cpython · GitHub

/ cpython Public

bpo-46841: Use inline caching for calls - #31709

Merged
brandtbucher merged 9 commits into
python:mainfrom
brandtbucher:inline-call
Mar 7, 2022
Merged

bpo-46841: Use inline caching for calls#31709
brandtbucher merged 9 commits into
python:mainfrom
brandtbucher:inline-call

Conversation

brandtbucher commented Mar 6, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Also:

  • remove the "old" non-inline caching machinery
  • fix some bugs in the collection of PRECALL/CALL specialization stats
  • shrink the cache size requirements for PRECALL/CALL instructions

Next steps tracked at faster-cpython/ideas#310.

https://bugs.python.org/issue46841

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @markshannon for commit 2021895 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 7, 2022
markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 7, 2022

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @markshannon for commit 2021895 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 7, 2022

markshannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Excellent.
A couple comments, but nothing to block merging.

);
}
/* Maximum size of code to quicken, in code units. */
#define MAX_SIZE_TO_QUICKEN 10000

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is this just to get the unpack sequence benchmark to work again, or something else?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nope, just for unpack_sequence.

PyObject *isinstance;
PyObject *len;
PyObject *list_append;
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think the existence of PyList_Type as part of the API means that list.append must be per-process unique.
In other words, list_append could be static.

I'm happy to leave it as is for now, though. We should look to make the whole struct static, although the mutability of builtin functions makes that tricky for isinstance and len.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I believe each interpreter has its own builtins module (check out _PyBuiltin_Init), so making this static could be tricky. As you said, though: probably worth looking into in the future.

brandtbucher merged commit f193631 into python:main Mar 7, 2022
brandtbucher deleted the inline-call branch July 21, 2022 20:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL