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: expose `sq_repeat` helpers for `BINARY_OP_EXTEND` by NekoAsakura · Pull Request #148791 · python/cpython

Conversation

@NekoAsakura

@NekoAsakura NekoAsakura commented Apr 20, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
main branch %
str * int 32.0 ns 26.4 ns -17.5%
int * str 32.7 ns 26.8 ns -18.0%
bytes * int 27.0 ns 23.1 ns -14.4%
int * bytes 27.2 ns 23.0 ns -15.4%
tuple * int 29.3 ns 24.9 ns -15.0%
int * tuple 29.7 ns 24.8 ns -16.5%
  • 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
@NekoAsakura
pythongh-100239: expose sq_repeat helpers for BINARY_OP_EXTEND
d8f65a1
@bedevere-app bedevere-app Bot added the awaiting review label Apr 20, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 20, 2026
Specialize long tail of binary operations using a table. #100239
Open
@eendebakpt eendebakpt added the skip news label Apr 20, 2026
eendebakpt
eendebakpt approved these changes May 7, 2026
View reviewed changes
Comment thread Python/specialize.c Outdated
int_str_multiply(PyObject *lhs, PyObject *rhs)
{
return seq_int_multiply(rhs, lhs, PyUnicode_Type.tp_as_sequence->sq_repeat);
Py_ssize_t count = PyLong_AsSsize_t(lhs);

@eendebakpt eendebakpt May 7, 2026

Copy link
Copy Markdown
Contributor

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.

This section is repeated a couple of times, we could use a macro to define the methods (similar to FLOAT_LONG_ACTION). But current form is also fine with me.

Sorry, something went wrong.

Uh oh!

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

NekoAsakura reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@NekoAsakura NekoAsakura May 7, 2026

Copy link
Copy Markdown
Member Author

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.

Good point. 17 insertions(+), 59 deletions(-).

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 core review and removed awaiting review labels May 7, 2026
@NekoAsakura
address feedback
9cf450a
@read-the-docs-community

read-the-docs-community Bot commented May 7, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32583781 | 📁 Comparing 9cf450a against main (13188db)

  🔍 Preview build  

109 files changed · ± 107 modified · - 2 deleted

± Modified

  • glossary.html
  • c-api/buffer.html
  • c-api/code.html
  • c-api/concrete.html
  • c-api/descriptor.html
  • c-api/exceptions.html
  • c-api/extension-modules.html
  • c-api/gen.html
  • c-api/index.html
  • c-api/interp-lifecycle.html
  • and 97 more...

- Deleted

  • c-api/sentinel.html
  • c-api/slots.html
All reactions

Sorry, something went wrong.

Uh oh!

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

@NekoAsakura

NekoAsakura commented May 7, 2026

Copy link
Copy Markdown
Member Author

@markshannon gentle ping :')

All reactions

Sorry, something went wrong.

Uh oh!

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

@NekoAsakura
Merge branch 'main' into pythongh-100239/expose-sq-repeat-helpers
87fd3b4
kumaraditya303
kumaraditya303 approved these changes May 8, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 8, 2026
@kumaraditya303
kumaraditya303 enabled auto-merge (squash) May 8, 2026 11:05
@kumaraditya303
kumaraditya303 merged commit d2d24e4 into python:main May 8, 2026
56 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label May 8, 2026
@NekoAsakura
NekoAsakura deleted the gh-100239/expose-sq-repeat-helpers branch May 8, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@eendebakpt eendebakpt eendebakpt approved these changes
@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

skip news

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.

3 participants

@NekoAsakura @eendebakpt @kumaraditya303
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.