[Python-Dev] Opcode frequency (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Wed Jun 18 23:12:15 CEST 2008
- Previous message: [Python-Dev] Opcode frequency
- Next message: [Python-Dev] Opcode frequency
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Georg Brandl <g.brandl gmx.net> writes:
Agreed; is there a way for a JUMP to end up without popping the top after jumping? It would have to do a DUP first then.
For example:
def f(x, y): ... return x and y ... import dis dis.dis(f) 2 0 LOAD_FAST 0 (x) 3 JUMP_IF_FALSE 4 (to 10) 6 POP_TOP
7 LOAD_FAST 1 (y) 10 RETURN_VALUE
- Previous message: [Python-Dev] Opcode frequency
- Next message: [Python-Dev] Opcode frequency
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]