Construct OperationIntegerMul

Performance Diagrams

Construct OperationIntegerMul 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000900000090000001000000010000000110000001100000012000000120000001300000013000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)1308679688.95192307692307257.0CPython 2.75400000242.31730769230768402.14825095462635Nuitka (master)5400000395.6826923076923402.14825095462635Nuitka (develop)5399286549.0480769230769402.16173327563257Nuitka (factory)Construct OperationIntegerMulTicks Construct OperationIntegerMul 002000000200000040000004000000600000060000008000000800000010000000100000001200000012000000140000001400000016000000160000001800000018000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)1912786588.95192307692307257.0CPython 3.512099922242.31730769230768347.7949129450673Nuitka (master)12099998395.6826923076923347.79393109114733Nuitka (develop)12100058549.0480769230769347.7931559433158Nuitka (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
267         tmp_assign_source_3 = tmp_mvar_value_4; 267         tmp_assign_source_3 = tmp_mvar_value_4;
268         assert(var_t == NULL); 268         assert(var_t == NULL);
269         Py_INCREF(tmp_assign_source_3); 269         Py_INCREF(tmp_assign_source_3);
270         var_t = tmp_assign_source_3; 270         var_t = tmp_assign_source_3;
271     } 271     }
n 272     { n
273         PyObject *tmp_assign_source_4;
274         PyObject *tmp_left_name_1;
275         PyObject *tmp_right_name_1;
276         CHECK_OBJECT(var_s);
277         tmp_left_name_1 = var_s;
278         CHECK_OBJECT(var_t);
279         tmp_right_name_1 = var_t;
280         tmp_assign_source_4 = BINARY_OPERATION_MUL_OBJECT_OBJECT( tmp_left_name_1, tmp_right_name_1 );
281         if ( tmp_assign_source_4 == NULL )
282         {
283             assert(ERROR_OCCURRED());
284  
285             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
286  
287  
288             exception_lineno = 33;
289             type_description_1 = "ooo";
290             goto frame_exception_exit_1;
291         }
292         {
293             PyObject *old = var_t;
294             assert(old != NULL);
295             var_t = tmp_assign_source_4;
296             Py_DECREF(old);
297         }
298  
299     }
300 272
301 #if 0 273 #if 0
302     RESTORE_FRAME_EXCEPTION(frame_ea68bed578cf8dd9411adcab473b8ef3); 274     RESTORE_FRAME_EXCEPTION(frame_ea68bed578cf8dd9411adcab473b8ef3);
303 #endif 275 #endif
304 276
391     exception_tb = NULL; 363     exception_tb = NULL;
392     exception_lineno = 0; 364     exception_lineno = 0;
393 365
394     Py_XDECREF(var_s); 366     Py_XDECREF(var_s);
395     var_s = NULL; 367     var_s = NULL;
t 396   t
397     Py_XDECREF(var_t);
398     var_t = NULL;
399 368
400     Py_XDECREF(var_local_value); 369     Py_XDECREF(var_local_value);
401     var_local_value = NULL; 370     var_local_value = NULL;
402 371
403     // Re-raise. 372     // Re-raise.