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-45510: Specialize BINARY_SUBTRACT by corona10 · Pull Request #29010 · python/cpython Conversation
|
|
🤖 New build scheduled with the buildbot fleet by @corona10 for commit fb360a2b562300ac17a10c49b43e0f496f51a0ee 🤖 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.
|
🤖 New build scheduled with the buildbot fleet by @corona10 for commit b4608cca7dccaf21358e4da854d0701cbe0d0e01 🤖 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.
There was an error while loading. Please reload this page.
|
The reason of build bot failure looks same with #29024 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ad423f5 to
a010e2d
Compare
|
@markshannon Rebased! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry about the conflicts. I wanted to get both the CALL_FUNCTION specializations PRs merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
a010e2d to
6b27e1f
Compare
There was an error while loading. Please reload this page.
I can do this all day :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A marginal speedup My concern with this change is that it will slow down any subtraction on anything other than pairs of ints and floats. Note that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I share the same concerns |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@markshannon cc @pablogsal @Fidget-Spinner
I definitely agree with your concern. So do I, At first, I thought that it's okayish since we already have the issue with
Whether merge this PR or not, it's worth measuring such benchmarks, we can get some data from this experiment. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@markshannon For your data
Benchmark hidden because not significant (1): float - int from pyperf import Runner runner = Runner() runner.timeit("int - int", setup=""" import random a = random.randint(1, 1000000) b = random.randint(1, 1000000) """, stmt=""" x = a - b """) runner.timeit("float - float", setup=""" import random a = random.uniform(1.5, 3.9) b = random.uniform(1.5, 3.9) """, stmt=""" x = a - b """ ) runner.timeit("int - float", setup=""" import random a = random.randint(1, 100000) b = random.uniform(1.5, 3.9) """, stmt=""" x = a - b """ ) runner.timeit("float - int", setup=""" import random a = random.randint(1, 100000) b = random.uniform(1.5, 3.9) """, stmt=""" x = b - a """ ) runner.timeit("decimal - decimal", setup=""" import random from decimal import Decimal as D a = D(random.randint(1, 100000)) b = D(random.randint(1, 100000)) """, stmt=""" x = a - b """ ) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Experiment 2
Benchmark hidden because not significant (1): float - int |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Unreliable my VM test with experiment2. :)
Benchmark hidden because not significant (16): float, go, json_loads, logging_silent, nbody, pickle_dict, pickle_pure_python, pidigits, pyflate, richards, scimark_fft, scimark_lu, scimark_monte_carlo, scimark_sparse_mat_mult, sqlite_synth, unpickle_list |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Will need reworking once #29482 is merged. Sorry to make you redo this, yet again 🙁 I think the end result will be better though, as we won't need yet another |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@markshannon |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Should this PR be closed (in favor of #29523)? |
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.