|
|
|
|
|
by billyzs
891 days ago
|
|
> a2, c = a2+c, c+2
> is faster than
> a2 += c
> c += 2
> My guess is that in the first case the two evaluations and assignments can happen in parallel, and so may happen on different cores Not sure I follow, isn't Python single threaded by default? Changes to GIL is coming but does it change how the interpreter uses CPU? |
|