Skip to content

gh-159580: Improve performance of isinstance() for misses and improve documentation - #159581

Open
eendebakpt wants to merge 3 commits into
python:mainfrom
eendebakpt:isinstance-class-fastpath
Open

eendebakpt wants to merge 3 commits into
python:mainfrom
eendebakpt:isinstance-class-fastpath

Conversation

@eendebakpt

@eendebakpt eendebakpt commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Improve performance of instance in the case of misses by avoiding attribute lookup on __class__. Documentation of isinstance is updated to match the actual behavior.

Details and benchmarks in the corresponding issue.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35201335 | 📁 Comparing 6fad9d7 against main (75ce53d)

  🔍 Preview build  

1 file changed
± builtins/functions.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant