¡@

Home 

python Programming Glossary: jump_absolute

Why does Python code run faster in a function?

http://stackoverflow.com/questions/11241523/why-does-python-code-run-faster-in-a-function

1 12 GET_ITER 13 FOR_ITER 6 to 22 16 STORE_FAST 0 i 3 19 JUMP_ABSOLUTE 13 22 POP_BLOCK 23 LOAD_CONST 0 None 26 RETURN_VALUE At top.. 1 12 GET_ITER 13 FOR_ITER 6 to 22 16 STORE_NAME 1 i 2 19 JUMP_ABSOLUTE 13 22 POP_BLOCK 23 LOAD_CONST 2 None 26 RETURN_VALUE The difference..

How should I understand the output of dis.dis?

http://stackoverflow.com/questions/12673074/how-should-i-understand-the-output-of-dis-dis

f_heapq d 3 0 BUILD_TUPLE 26719 3 LOAD_NAME 28769 28769 6 JUMP_ABSOLUTE 25640 9 44 # what is 44 10 DELETE_SLICE 1 11 STORE_SLICE 1..

Accessing class variables from a list comprehension in the class definition

http://stackoverflow.com/questions/13905741/accessing-class-variables-from-a-list-comprehension-in-the-class-definition

40 28 STORE_NAME 4 i 31 LOAD_NAME 2 x 34 LIST_APPEND 2 37 JUMP_ABSOLUTE 25 40 STORE_NAME 5 y 43 LOAD_LOCALS 44 RETURN_VALUE No code.. 9 STORE_FAST 1 i 12 LOAD_GLOBAL 0 x 15 LIST_APPEND 2 18 JUMP_ABSOLUTE 6 21 RETURN_VALUE This chunk of bytecode loads the first argument.. 9 STORE_FAST 1 i 12 LOAD_DEREF 0 x 15 LIST_APPEND 2 18 JUMP_ABSOLUTE 6 21 RETURN_VALUE The LOAD_DEREF will indirectly load x from..

Python: generator expression vs. yield

http://stackoverflow.com/questions/1995418/python-generator-expression-vs-yield

3 j 44 BUILD_TUPLE 2 47 YIELD_VALUE 48 POP_TOP 49 JUMP_ABSOLUTE 32 52 POP_BLOCK 53 JUMP_ABSOLUTE 13 56 POP_BLOCK 57 LOAD_CONST.. YIELD_VALUE 48 POP_TOP 49 JUMP_ABSOLUTE 32 52 POP_BLOCK 53 JUMP_ABSOLUTE 13 56 POP_BLOCK 57 LOAD_CONST 0 None 60 RETURN_VALUE def Generator_expr.. 2 j 37 BUILD_TUPLE 2 40 YIELD_VALUE 41 POP_TOP 42 JUMP_ABSOLUTE 25 45 POP_BLOCK 46 JUMP_ABSOLUTE 6 49 POP_BLOCK 50 LOAD_CONST..

while (1) Vs. for while(True) — Why is there a difference?

http://stackoverflow.com/questions/3815359/while-1-vs-for-whiletrue-why-is-there-a-difference

the following results while 1 4 0 SETUP_LOOP 3 to 6 5 3 JUMP_ABSOLUTE 3 6 LOAD_CONST 0 None 9 RETURN_VALUE while True 8 0 SETUP_LOOP.. 0 True 6 JUMP_IF_FALSE 4 to 13 9 POP_TOP 9 10 JUMP_ABSOLUTE 3 13 POP_TOP 14 POP_BLOCK 15 LOAD_CONST 0 None 18 RETURN_VALUE.. identical operations while 1 4 0 SETUP_LOOP 3 to 6 5 3 JUMP_ABSOLUTE 3 6 LOAD_CONST 0 None 9 RETURN_VALUE while True 8 0 SETUP_LOOP..

Why is looping over range() in Python faster than using a while loop?

http://stackoverflow.com/questions/869229/why-is-looping-over-range-in-python-faster-than-using-a-while-loop

LOAD_CONST 2 1 # 28 INPLACE_ADD # 29 STORE_NAME 0 i # 32 JUMP_ABSOLUTE 9 # 35 POP_TOP 36 POP_BLOCK The loop body has 10 op use range.. GET_ITER 16 FOR_ITER 6 to 25 # 19 STORE_NAME 1 n # 2 22 JUMP_ABSOLUTE 16 # 25 POP_BLOCK 26 LOAD_CONST 2 None 29 RETURN_VALUE The loop..