[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-21 Thread Alex Waygood
Change by Alex Waygood : -- type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I agree with Serhiy -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why anybody needs to write 255581293 > 12938373? We try to keep the compiler code maintenable and only implement optimizations which have the largest effect. PR 29639 adds around 200 lines of complex code and I do not see the benefit. --

[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-20 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Result of `255581293 > 12938373 and 113314 < 2`: Is there a similar pattern that happens a lot on the client code? The AST optimizer currently only optimizes common cases. -- nosy: +BTaskaya, pablogsal, serhiy.storchaka

[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-19 Thread theeshallnotknowethme
theeshallnotknowethme added the comment: Above tested using `timeit.main`. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-19 Thread theeshallnotknowethme
Change by theeshallnotknowethme : -- keywords: +patch pull_requests: +27870 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29639 ___ Python tracker

[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-19 Thread theeshallnotknowethme
New submission from theeshallnotknowethme : Result of `255581293 > 12938373 and 113314 < 2`: Unoptimized: 500 loops, best of 5: 42.6 nsec per loop Optimized: 2000 loops, best of 5: 14.4 nsec per loop -- components: Interpreter Core messages: 406582 nosy: February291948