Simple tests show about 15…45 percent difference on Python 3.11.5 (Windows 10, i7-11gen).

```
# Python Testfile 2023
import math # math.pi
import time
# global parameter
p0,p1,p2,p3,p4 = 0.1,1.1,2.2,3.3,4.4
# Block 0: Reference
dt = time.time()
# nothing (NOP)
dt1 = (time.time() - dt)*1000
dt = time.time()
for i in range(1000*1000):
s = 1
dt2 = (time.time() - dt)*1000
dt,dtr = dt2-dt1,-1.0
print("t_nop=%.6f, t_for=%.6f, d=%.6f(--) [ms]" % (dt1,dt2,dt)) # 0.0 + 60 (d=100%) ms
tfor=dt2
# Block 1: unused (forgotten) variables
dt = time.time()
for i in range(1000*1000):
_,_,_ = 1.1,2.2,3.3 # not used
# something else independent
dt1 = (time.time() - dt)*1000
dt = time.time()
for i in range(1000*1000):
a,b,c = 1.1,2.2,3.3
# something else independent
dt2 = (time.time() - dt)*1000
dt,dtr = dt2-tfor,100.0*(dt2-tfor)/dt2
print("t_uu_3=%.6f, t_uu3a=%.6f, d=(%.6f)(%.1f%%) [ms]" % (dt1, dt2,dt,dtr)) # 100+100 (d=40% vs t_for) ms
# compare to t_for=60 gives >50% timeloss
# Block 2: PI
s = 0.0
dt = time.time()
for i in range(1000*1000):
s = 3.141592654
dt1 = (time.time() - dt)*1000
dt = time.time()
for i in range(1000*1000):
s = math.pi
dt2 = (time.time() - dt)*1000
dt,dtr = dt2-dt1,100.0*(dt2-dt1)/dt2
print("t_3141=%.6f, t_m.pi=%.6f, d=%.6f(%.1f%%) [ms]" % (dt1,dt2,dt,dtr)) # 60 + 85 (d=30%) ms
# Block 3: many used temp
dt = time.time()
for i in range(1000*1000):
# a,b,c = s*0.1,s*0.2,s*0.3
s = ((1.1+(s*0.1)*1.2)*(s*0.2)-1.3)*(s*0.3)-1.4
dt1 = (time.time() - dt)*1000
dt = time.time()
for i in range(1000*1000):
a,b,c = s*0.1,s*0.2,s*0.3
s = ((1.1+a*1.2)*b-1.3)*c-1.4
dt2 = (time.time() - dt)*1000
dt,dtr = dt2-dt1,100.0*(dt2-dt1)/dt2
print("t_mutD=%.6f, t_mutV=%.6f, d=%.6f(%.1f%%) [ms]" % (dt1,dt2,dt,dtr)) # 220 + 330 (d=30%) ms
# Block 4: global parameters (polnomial x**3)
dt = time.time()
for i in range(1000*1000):
s = ((1.1+p0*1.2) *p0-1.3) *p0-1.4 # p0 avoids compile-time-number
dt1 = (time.time() - dt)*1000
dt = time.time()
for i in range(1000*1000):
s = ((p1+p0*p2) *p0-p3) *p0-p4
dt2 = (time.time() - dt)*1000
dt,dtr = dt2-dt1,100.0*(dt2-dt1)/dt2
print("t_polD=%.6f, t_polG=%.6f, d=%.6f(%.1f%%) [ms]" % (dt1,dt2,dt,dtr)) # 183 + 211 (d=30) ms
# Block 5: temp (single usage var.)
# Sample output (run again for averages)
# Win10 + Python 3.11.5 + mobile Intel i7-11xxx
# t_nop=0.000000, t_for=54.032087, d=54.032087(--) [ms]
# t_uu_3=117.016554, t_uu3a=99.645853, d=(45.613766)(45.8%) [ms]
# t_3141=50.169706, t_m.pi=80.700159, d=30.530453(37.8%) [ms]
# t_mutD=236.411810, t_mutV=328.007460, d=91.595650(27.9%) [ms]
# t_polD=178.054333, t_polG=207.845211, d=29.790878(14.3%) [ms]
#EOF.
```