[issue47221] Bug or bad performance

2022-04-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: I believe this is a duplicate of this issue: https://bugs.python.org/issue45542 -- nosy: +Dennis Sweeney ___ Python tracker ___ _

[issue47221] Bug or bad performance

2022-04-04 Thread Cezary Wagner
Cezary Wagner added the comment: Some more experiments: import dis import timeit REPEATS = 100 def test1(): selected = [] for i in range(REPEATS): if i >= 25 and i <= 75: selected.append(i) return selected def test2(): selected = [] for i in range(R

[issue47221] Bug or bad performance

2022-04-04 Thread Cezary Wagner
New submission from Cezary Wagner : I am experienced programmer 10y+ - that is very very strange performance problem when I play Python timeit with my son :) three way operator a <= x <= b is slower than a <= x and x <= b. It looks like wrong implementation since it is impossible that two sep