Message26426
Logged In: YES
user_id=432579
Thank you for your analysis.
I'm not intimitely familiar with the bytecodes, but one way
would be to omit the writeback (STORE_SUBSCR) if the result
of INPLACE_OR is identical to its input. This could probably
be done without changing the bytecodes but might profit from
some changes for speed and compactness.
That is (pseudocode):
_t1 = t[i]
_t2 = inplace_or(_t1, a)
if _t2 is not _t1:
t[i] = _t2
Another variant would be to add indexed variants of the
augmented assigment methods; that is, augmented variants of
__setitem__, but that has other drawbacks. However, it might
be useful in its own regard in some cases.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:34:54 | admin | link | issue1306777 messages |
2007-08-23 14:34:54 | admin | create | |
|