Construct OperationIntegerAdd

Performance Diagrams

Construct OperationIntegerAdd 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000800000080000009000000900000010000000100000001100000011000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)1103892488.95192307692307257.0CPython 2.74099346242.31730769230768412.34815590164965Nuitka (master)4100228395.6826923076923412.3284116068949Nuitka (develop)4099940549.0480769230769412.33485872354953Nuitka (factory)Construct OperationIntegerAddTicks Construct OperationIntegerAdd 00200000020000004000000400000060000006000000800000080000001000000010000000120000001200000014000000140000001600000016000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)1737218288.95192307692307257.0CPython 3.59800118242.31730769230768364.710908606202Nuitka (master)9799042395.6826923076923364.72621446437495Nuitka (develop)9800724549.0480769230769364.7022883923983Nuitka (factory)Construct OperationIntegerAddTicks

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
273         tmp_assign_source_3 = tmp_mvar_value_4; 273         tmp_assign_source_3 = tmp_mvar_value_4;
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     }
n 278     { n
279         PyObject *tmp_assign_source_4;
280         PyObject *tmp_left_name_1;
281         PyObject *tmp_right_name_1;
282         CHECK_OBJECT( var_s );
283         tmp_left_name_1 = var_s;
284         CHECK_OBJECT( var_t );
285         tmp_right_name_1 = var_t;
286         tmp_assign_source_4 = BINARY_OPERATION_ADD_OBJECT_OBJECT( tmp_left_name_1, tmp_right_name_1 );
287         if ( tmp_assign_source_4 == NULL )
288         {
289             assert( ERROR_OCCURRED() );
290  
291             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
292  
293  
294             exception_lineno = 33;
295             type_description_1 = "ooo";
296             goto frame_exception_exit_1;
297         }
298         {
299             PyObject *old = var_t;
300             assert( old != NULL );
301             var_t = tmp_assign_source_4;
302             Py_DECREF( old );
303         }
304  
305     }
306 278
307 #if 0 279 #if 0
308     RESTORE_FRAME_EXCEPTION( frame_e2ffb80b86e2535c4c9ff1daee0b54da ); 280     RESTORE_FRAME_EXCEPTION( frame_e2ffb80b86e2535c4c9ff1daee0b54da );
309 #endif 281 #endif
310 282
400     exception_tb = NULL; 372     exception_tb = NULL;
401     exception_lineno = 0; 373     exception_lineno = 0;
402 374
403     Py_XDECREF( var_s ); 375     Py_XDECREF( var_s );
404     var_s = NULL; 376     var_s = NULL;
t 405   t
406     Py_XDECREF( var_t );
407     var_t = NULL;
408 377
409     Py_XDECREF( var_local_value ); 378     Py_XDECREF( var_local_value );
410     var_local_value = NULL; 379     var_local_value = NULL;
411 380
412     // Re-raise. 381     // Re-raise.