Construct OperationIntegerMul

Performance Diagrams

Construct OperationIntegerMul 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000900000090000001000000010000000110000001100000012000000120000001300000013000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)1383884888.95192307692307257.0CPython 2.75550068242.31730769230768405.0097951572492Nuitka (master)5550080395.6826923076923405.00958087751906Nuitka (develop)5549330549.0480769230769405.02297336065504Nuitka (factory)Construct OperationIntegerMulTicks Construct OperationIntegerMul 002000000200000040000004000000600000060000008000000800000010000000100000001200000012000000140000001400000016000000160000001800000018000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)1932907288.95192307692307257.00000000000006CPython 3.511652288242.31730769230768355.14498237521343Nuitka (master)11651218395.6826923076923355.1586619487356Nuitka (develop)11646839549.0480769230769355.21464592299105Nuitka (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
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_MUL( 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_b78a918c576f652650ee9b7bdcb211d2 ); 280     RESTORE_FRAME_EXCEPTION( frame_b78a918c576f652650ee9b7bdcb211d2 );
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.