On 04/26/2018 11:18 AM, Chris Angelico wrote:
In the reference implementation, it's just DUP_TOP followed by
STORE_FAST (well, technically by "whatever the assignment compiles
to", as it could be affected by global/nonlocal, closures, etc). Is
there much advantage to creating a new opcode?

Probably not much, but I thought we now lived in an age of wonders where common sequences of opcodes were getting mashed together into new more-complicated-but-redundant bytecodes (e.g. BUILD_MAP_UNPACK_WITH_CALL) just to save on dispatch overhead. You're right, it'd be a micro-optimization, and its value would be debatable.


//arry/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to