GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-100239: specialize BINARY_OP/SUBSCR for list-slice by iritkatriel · Pull Request #132626 · python/cpython

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Apr 17, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Benchmarks (stats better, time unchanged):

https://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20250416-3.14.0a7%2B-c52d9d2/bm-20250416-azure-x86_64-iritkatriel-list_subscr-3.14.0a7%2B-c52d9d2-pystats.md

  • Issue: Specialize long tail of binary operations using a table. #100239

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iritkatriel
pythongh-100239: specialize BINARY_OP/SUBSCR for list-slice
c52d9d2
@iritkatriel
iritkatriel requested a review from markshannon as a code owner April 17, 2025 08:51
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 17, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Apr 17, 2025
Specialize long tail of binary operations using a table. #100239
Open
iritkatriel and others added 3 commits April 17, 2025 10:31
@iritkatriel
remove cast
3513e8f
@iritkatriel
pacify the jit
c337181
@blurb-it
📜🤖 Added by blurb_it.
1b40ba6
@markshannon

markshannon commented Apr 17, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

list_subscript/_PyList_Subscript is the general subscript function for lists. I think we want to use a more specialized function that only works for slices. i.e this code: https://github.com/python/cpython/blob/main/Objects/listobject.c#L3614-L3618

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel
use specific function
3074926
@markshannon

markshannon commented Apr 29, 2025

Copy link
Copy Markdown
Member

The stats diff show a 50x increase in "subscr tuple slice" as a cause of specialization failure. Any idea why that might be? I can't see any reason for it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

markshannon
markshannon approved these changes Apr 29, 2025
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

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.

Looks good

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 29, 2025
iritkatriel and others added 4 commits April 29, 2025 23:17
@iritkatriel
Merge remote-tracking branch 'upstream/main' into list_subscr
638a892
@iritkatriel
bump PYSTATS_MAX_UOP_ID
a054a83
@iritkatriel
Merge remote-tracking branch 'upstream/main' into list_subscr
83e1296
@iritkatriel
Merge branch 'main' into list_subscr
cf96793
@iritkatriel
iritkatriel enabled auto-merge (squash) May 1, 2025 10:15
@iritkatriel
iritkatriel merged commit 5529213 into python:main May 1, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label May 1, 2025
@ambv ambv mentioned this pull request May 1, 2025
Trying to ./python -m test -R: test_index crashes with a failed assertion #133258
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon markshannon approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@iritkatriel @markshannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.