◐ Shell
reader mode source ↗
Skip to content

bpo-44945: Specialize BINARY_ADD#27967

Merged
markshannon merged 15 commits into
python:mainfrom
faster-cpython:specialize-binary-add
Aug 27, 2021
Merged

bpo-44945: Specialize BINARY_ADD#27967
markshannon merged 15 commits into
python:mainfrom
faster-cpython:specialize-binary-add

Conversation

@markshannon

@markshannon markshannon commented Aug 26, 2021

Copy link
Copy Markdown
Member

Adds the following specializations:

  • BINARY_ADD_ADAPTIVE
  • BINARY_ADD_FLOAT
  • BINARY_ADD_INT
  • BINARY_ADD_UNICODE
  • BINARY_ADD_UNICODE_INPLACE_FAST

BINARY_ADD_UNICODE_INPLACE_FAST is needed to keep for ...: s = s + ... O(ln(n)), rather than O(n**2).

About 1% faster

https://bugs.python.org/issue44945

@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2021
@bedevere-bot

Copy link
Copy Markdown

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

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2021

@Fidget-Spinner Fidget-Spinner 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.

Hide comment

LGTM except for the specialization for inplace strings (it causes refleaks, see below).

@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2021
@bedevere-bot

Copy link
Copy Markdown

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

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2021

@Fidget-Spinner Fidget-Spinner 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.

Hide comment

LGTM.

@markshannon

Copy link
Copy Markdown
Member Author

Failure on buildbot/AMD64 Arch Linux Asan Debug PR is a persistent failure unrelated to this PR.

@markshannon markshannon merged commit d3eaf0c into python:main Aug 27, 2021
@markshannon markshannon deleted the specialize-binary-add branch September 15, 2021 11:51
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