Message289029
How it comparing with
return vec1[0]*vec2[0]+vec1[1]*vec2[1]+vec1[2]*vec2[2]
and
x1, y1, z1 = vec1
x2, y2, z2 = vec2
return x1*x2+y1*y2+z1*z2
and
x1, y1, z1 = vec1
x2, y2, z2 = vec2
return sum(a*b for a, b in zip(vec1, vec2))
?
A 5% speed up may be not enough high for cluttering the educational example. |
|
Date |
User |
Action |
Args |
2017-03-05 17:45:07 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, vstinner, steven.daprano, docs@python, Kwpolska |
2017-03-05 17:45:07 | serhiy.storchaka | set | messageid: <1488735907.63.0.563519385986.issue29724@psf.upfronthosting.co.za> |
2017-03-05 17:45:07 | serhiy.storchaka | link | issue29724 messages |
2017-03-05 17:45:07 | serhiy.storchaka | create | |
|