Construct OperationIntegerMul

Performance Diagrams

Construct OperationIntegerMul 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000800000080000009000000900000010000000100000001100000011000000120000001200000013000000130000001400000014000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)1423790788.95192307692307257.0CPython 2.75550604242.31730769230768407.7782163568975Nuitka (master)5550060395.6826923076923407.78765810765697Nuitka (develop)5549371549.0480769230769407.79961650154166Nuitka (factory)Construct OperationIntegerMulTicks Construct OperationIntegerMul 002000000200000040000004000000600000060000008000000800000010000000100000001200000012000000140000001400000016000000160000001800000018000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)1922306188.95192307692307257.0CPython 3.511652660242.31730769230768354.3186608942089Nuitka (master)11651553395.6826923076923354.33289154825354Nuitka (develop)11644720549.0480769230769354.42073080668774Nuitka (factory)Construct OperationIntegerMulTicks

Source Code with Construct

module_value1 = 5000
module_value2 = 3000

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    local_value = module_value1

    s = module_value1
    t = module_value2
# construct_begin
    t = s * t
# construct_end

    return s, t, local_value

import itertools
for x in itertools.repeat(None, 50000):
    calledRepeatedly()

print("OK.")

Source Code without Construct

module_value1 = 5000
module_value2 = 3000

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    local_value = module_value1

    s = module_value1
    t = module_value2
# construct_begin



    return s, t, local_value

import itertools
for x in itertools.repeat(None, 50000):
    calledRepeatedly()

print("OK.")

Context Diff of Source Code


Construct
Baseline
28     local_value = module_value1 28     local_value = module_value1
29 29
30     s = module_value1 30     s = module_value1
31     t = module_value2 31     t = module_value2
32 # construct_begin 32 # construct_begin
t 33     t = s * t t 33  
34 # construct_end 34  
35 35
36     return s, t, local_value 36     return s, t, local_value
37 37
38 import itertools 38 import itertools
39 for x in itertools.repeat(None, 50000): 39 for x in itertools.repeat(None, 50000):

Context Diff of Generated Code


Construct
Baseline
274     assert( var_t == NULL ); 274     assert( var_t == NULL );
275     Py_INCREF( tmp_assign_source_3 ); 275     Py_INCREF( tmp_assign_source_3 );
276     var_t = tmp_assign_source_3; 276     var_t = tmp_assign_source_3;
277 277
278     } 278     }
n 279     { n
280     PyObject *tmp_assign_source_4;
281     PyObject *tmp_left_name_1;
282     PyObject *tmp_right_name_1;
283     CHECK_OBJECT( var_s );
284     tmp_left_name_1 = var_s;
285     CHECK_OBJECT( var_t );
286     tmp_right_name_1 = var_t;
287     tmp_assign_source_4 = BINARY_OPERATION_MUL( tmp_left_name_1, tmp_right_name_1 );
288     if ( tmp_assign_source_4 == NULL )
289     {
290         assert( ERROR_OCCURRED() );
291  
292         FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
293  
294  
295         exception_lineno = 33;
296         type_description_1 = "ooo";
297         goto frame_exception_exit_1;
298     }
299     {
300         PyObject *old = var_t;
301         assert( old != NULL );
302         var_t = tmp_assign_source_4;
303         Py_DECREF( old );
304     }
305  
306     }
307 279
308 #if 0 280 #if 0
309     RESTORE_FRAME_EXCEPTION( frame_6e527644fd5e183d869ae0086de848dd ); 281     RESTORE_FRAME_EXCEPTION( frame_6e527644fd5e183d869ae0086de848dd );
310 #endif 282 #endif
311 283
410     exception_lineno = 0; 382     exception_lineno = 0;
411 383
412     { 384     {
413     Py_XDECREF( var_s ); 385     Py_XDECREF( var_s );
414     var_s = NULL; 386     var_s = NULL;
t 415   t
416     }
417     {
418     Py_XDECREF( var_t );
419     var_t = NULL;
420 387
421     } 388     }
422     { 389     {
423     Py_XDECREF( var_local_value ); 390     Py_XDECREF( var_local_value );
424     var_local_value = NULL; 391     var_local_value = NULL;