3 ms·
I tested this. tldr; I could not replicate speed benefits except for heavy stack usage. Python 3.10 is 8% slower than python 3.8. Python 3.10 with said optimiz
by freediver 5y ago
I tested this.
tldr;
I could not replicate speed benefits except for heavy stack usage. Python 3.10 is 8% slower than python 3.8. Python 3.10 with said optimization is 3% slower overall than Python 3.10 without it except for stack usage.
Python 3.8
python-speed v1.2 using python v3.8.5
string/mem: 1476.42 ms
pi calc/math: 1817.37 ms
regex: 1984.63 ms
fibonnaci/stack: 1085.79 ms
total: 6364.21 ms (lower is better)
Python 3.10 no optimization
python-speed v1.2 using python v3.10.0
string/mem: 1580.52 ms
pi calc/math: 1796.23 ms
regex: 2110.86 ms
fibonnaci/stack: 1337.18 ms
total: 6824.79 ms (lower is better)
Python 3.10 with optimization
python-speed v1.2 using python v3.10.0
string/mem: 1559.45 ms
pi calc/math: 1821.25 ms
regex: 2387.64 ms
fibonnaci/stack: 1299.8 ms
total: 7068.13 ms (lower is better)
Anything I am missing?
Tested using https://github.com/vprelovac/python-speed https://github.com/vprelovac/python-speed