Construct OperationIntegerMul

Performance Diagrams

Construct OperationIntegerMul 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000900000090000001000000010000000110000001100000012000000120000001300000013000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)1383884888.95192307692307257.0CPython 2.75549982242.31730769230768405.0113308286488Nuitka (master)5549982395.6826923076923405.0113308286488Nuitka (develop)5549970549.0480769230769405.011545108379Nuitka (factory)Construct OperationIntegerMulTicks Construct OperationIntegerMul 002000000200000040000004000000600000060000008000000800000010000000100000001200000012000000140000001400000016000000160000001800000018000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)1932907288.95192307692307257.00000000000006CPython 3.511797122242.31730769230768353.29333064483626Nuitka (master)11799692395.6826923076923353.2604740990869Nuitka (develop)11800072549.0480769230769353.2556159327893Nuitka (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
272         tmp_assign_source_3 = tmp_mvar_value_4; 272         tmp_assign_source_3 = tmp_mvar_value_4;
273         assert( var_t == NULL ); 273         assert( var_t == NULL );
274         Py_INCREF( tmp_assign_source_3 ); 274         Py_INCREF( tmp_assign_source_3 );
275         var_t = tmp_assign_source_3; 275         var_t = tmp_assign_source_3;
276     } 276     }
n 277     { n
278         PyObject *tmp_assign_source_4;
279         PyObject *tmp_left_name_1;
280         PyObject *tmp_right_name_1;
281         CHECK_OBJECT( var_s );
282         tmp_left_name_1 = var_s;
283         CHECK_OBJECT( var_t );
284         tmp_right_name_1 = var_t;
285         tmp_assign_source_4 = BINARY_OPERATION_MUL_OBJECT_OBJECT( tmp_left_name_1, tmp_right_name_1 );
286         if ( tmp_assign_source_4 == NULL )
287         {
288             assert( ERROR_OCCURRED() );
289  
290             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
291  
292  
293             exception_lineno = 33;
294             type_description_1 = "ooo";
295             goto frame_exception_exit_1;
296         }
297         {
298             PyObject *old = var_t;
299             assert( old != NULL );
300             var_t = tmp_assign_source_4;
301             Py_DECREF( old );
302         }
303  
304     }
305 277
306 #if 0 278 #if 0
307     RESTORE_FRAME_EXCEPTION( frame_1b7bc7f4281fe61d1219279a735d686c ); 279     RESTORE_FRAME_EXCEPTION( frame_1b7bc7f4281fe61d1219279a735d686c );
308 #endif 280 #endif
309 281
399     exception_tb = NULL; 371     exception_tb = NULL;
400     exception_lineno = 0; 372     exception_lineno = 0;
401 373
402     Py_XDECREF( var_s ); 374     Py_XDECREF( var_s );
403     var_s = NULL; 375     var_s = NULL;
t 404   t
405     Py_XDECREF( var_t );
406     var_t = NULL;
407 376
408     Py_XDECREF( var_local_value ); 377     Py_XDECREF( var_local_value );
409     var_local_value = NULL; 378     var_local_value = NULL;
410 379
411     // Re-raise. 380     // Re-raise.