GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-45508: Specialize INPLACE_ADD by sweeneyde · Pull Request #29024 · python/cpython Conversation
|
|
🤖 New build scheduled with the buildbot fleet by @sweeneyde for commit 62c1d38 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The s390x RHEL7 LTO PR failure is https://bugs.python.org/issue45484 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
You can remove |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Any performance numbers or specialization stats for this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Maybe I should read the first comment 🙂 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'd like to hold off merging this until we have a better way to handle classes like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I merged with main and ran some microbenchmarks, and it seems Microbenchmark program: from pyperf import Runner runner = Runner() runner.timeit("int+=int", setup="from itertools import repeat", stmt="x = 0\n" "for y in repeat(1, 10_000):\n" " x += y; x += y; x += y; x += y; x += y" ) runner.timeit("float+=float", setup="from itertools import repeat", stmt="x = 0.0\n" "for y in repeat(1.0, 10_000):\n" " x += y; x += y; x += y; x += y; x += y" ) runner.timeit("str+=str", setup="from itertools import repeat", stmt="for y in repeat('a', 10_000):\n" " x = ''; x += y; x += y; x += y; x += y; x += y" ) runner.timeit("list[0]+=str", setup="from itertools import repeat", stmt="x = [None]\n" "for y in repeat('a', 10_000):\n" " x[0] = ''; x[0] += y; x[0] += y; x[0] += y; x[0] += y; x[0] += y" ) runner.timeit("float+=int", setup="from itertools import repeat", stmt="x = 0.0\n" "for y in repeat(1, 10_000):\n" " x += y; x += y; x += y; x += y; x += y" ) runner.timeit("decimal+=decimal", setup="from itertools import repeat; from decimal import Decimal as D", stmt="x = D(0)\n" "for y in repeat(D(1), 10_000):\n" " x += y; x += y; x += y; x += y; x += y" ) runner.timeit("list[0]+=1", setup="from itertools import repeat; from collections import defaultdict", stmt="dd = [0]\n" "for y in repeat(1, 10_000):\n" " dd[0] += y; dd[0] += y; dd[0] += y; dd[0] += y; dd[0] += y", ) runner.timeit("defaultdict(int)[0]+=1", setup="from itertools import repeat; from collections import defaultdict", stmt="dd = defaultdict(int)\n" "for y in repeat(1, 10_000):\n" " dd[0] += y; dd[0] += y; dd[0] += y; dd[0] += y; dd[0] += y", ) Results from PGO on MSVC:
Results from PGO on GCC (WSL):
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Once #29482 is merged this will need to reworked for the Nth (and hopefully last) time. Sorry about that. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think PR 29482 will just make this obsolete -- it manages to re-use |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.