Thomas Lee <tom <at> vector-seven.com> writes: > By the way, you were right about JUMP_IF_TRUE/JUMP_IF_FALSE. It's far > too late. Apologies. > > I'm still pretty sure this is the peepholer's doing,
Yes indeed. > Which is what's being achieved with the AST optimization I originally > proposed, right? Well, not exactly, your optimization eliminates the UNARY_NOT by swapping the if/else blocks, while the peepholer eliminates the UNARY_NOT by fusing it with the subsequent jump opcode. In this case it doesn't make much of a difference, but if there is only an "if" without an "else", the peepholer's optimization is still possible while yours is not. (bottom line: the peepholer is not dead!) cheers, Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com