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 — gh-132732: Treat `bytes` as constants in `_Py_uop_sym_is_safe_const` by sobolevn · Pull Request #136033 · python/cpython Conversation
|
|
One thing that slightly worries me about this is that comparing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Ok let's not do this then. We still need to fix the long stuff though so @sobolevn are you open to that or do you want me to handle it? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I opened PR #136040 to fix the compact ints issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Did you mean checking for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
You can fetch the value once at the start of optimization time in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Or, simpler, just explicitly disallow optimizing the problematic comparisons. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
If one of the values is of type bytes, require the other to be as well. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Not just comparisons. BINARY_OP as well. This is a little annoying and more involved than I expected, so I'd say let's just ignore it for now? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
What |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Not BytesWarning. BINARY_OP (str, bytes) will throw. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
That’s the case for many combinations of safe types. We should suppress the error and hit bottom in that case (in the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Same for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This is just different because it’s a warning, to clarify. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yeah the optimizer currently doesn't do that. Opened a PR to do so #136048 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I opened https://discuss.python.org/t/consider-deprecating-and-eventually-removing-b-cli-flag/96903 about possibly removing this warning in the future versions. It does not seem very useful :( |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I fixed the merge conflict. Sorry, I am rather new to the JIT internals, and I don't quite understand the
Is there anything I need to do in this PR to address them? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
We plan to follow up shortly with COMPARE_OP here #130415 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ok then :) |
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.