> On 2017-05-24, at 20:07 , Ben Hoyt <benh...@gmail.com> wrote: > > Hi folks, > > I was looking at some `dis` output today, and I was wondering if anyone has > investigated optimizing Python (slightly) by adding special-case bytecodes > for common expressions or statements involving constants?
Python 3.6 added an opcode specifically for dicts with constant keys: https://bugs.python.org/issue27140. Though I guess that's a slightly different case as it's not a peephole-fused opcode. _______________________________________________ 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