Message46258
Logged In: YES
user_id=4771
Optimizing BINARY_ADD was what I did in the first patch too, but it has the drawback of being harder to explain. The main trouble I see is that a=a+b+c will NOT be accelerated, while a=a+b or a+=b+c will.
The rationale for only tampering with INPLACE_ADD was to make the result more predictable. Moreover the behavior would be superficially similar to what occurs with lists with a=a+b vs a+=b.
In-place operators in Python are a dark corner of the language. I think it is OK for people to think about it as a possibly optimized (in-place-modifying) version of the standard operators. Thus the idea of only tampering with INPLACE_ADD for the optimization here.
Well, maybe you can find a convincingly clear explanation of why a=a+b works but a=a+b+c doesn't. |
|
Date |
User |
Action |
Args |
2007-08-23 15:38:22 | admin | link | issue980695 messages |
2007-08-23 15:38:22 | admin | create | |
|