Construct OperationIntegerMul

Performance Diagrams

Construct OperationIntegerMul 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000900000090000001000000010000000110000001100000012000000120000001300000013000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)1308679688.95192307692307257.0CPython 2.75400780242.31730769230768402.13352236865313Nuitka (master)5399340395.6826923076923402.160713604296Nuitka (develop)5399184549.0480769230769402.1636593214906Nuitka (factory)Construct OperationIntegerMulTicks Construct OperationIntegerMul 002000000200000040000004000000600000060000008000000800000010000000100000001200000012000000140000001400000016000000160000001800000018000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)1912786588.95192307692307257.0CPython 3.512099678242.31730769230768347.7980652129156Nuitka (master)12100426395.6826923076923347.78840170328226Nuitka (develop)12100008549.0480769230769347.7938018998421Nuitka (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
262         tmp_assign_source_3 = tmp_mvar_value_4; 262         tmp_assign_source_3 = tmp_mvar_value_4;
263         assert(var_t == NULL); 263         assert(var_t == NULL);
264         Py_INCREF(tmp_assign_source_3); 264         Py_INCREF(tmp_assign_source_3);
265         var_t = tmp_assign_source_3; 265         var_t = tmp_assign_source_3;
266     } 266     }
n 267     { n
268         PyObject *tmp_assign_source_4;
269         PyObject *tmp_left_name_1;
270         PyObject *tmp_right_name_1;
271         CHECK_OBJECT(var_s);
272         tmp_left_name_1 = var_s;
273         CHECK_OBJECT(var_t);
274         tmp_right_name_1 = var_t;
275         tmp_assign_source_4 = BINARY_OPERATION_MUL_OBJECT_OBJECT(tmp_left_name_1, tmp_right_name_1);
276         if (tmp_assign_source_4 == NULL) {
277             assert(ERROR_OCCURRED());
278  
279             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
280  
281  
282             exception_lineno = 33;
283             type_description_1 = "ooo";
284             goto frame_exception_exit_1;
285         }
286         {
287             PyObject *old = var_t;
288             assert(old != NULL);
289             var_t = tmp_assign_source_4;
290             Py_DECREF(old);
291         }
292  
293     }
294 267
295 #if 0 268 #if 0
296     RESTORE_FRAME_EXCEPTION(frame_d219cf7b223cd09a7bb6292709cfc90d); 269     RESTORE_FRAME_EXCEPTION(frame_d219cf7b223cd09a7bb6292709cfc90d);
297 #endif 270 #endif
298 271
385     exception_tb = NULL; 358     exception_tb = NULL;
386     exception_lineno = 0; 359     exception_lineno = 0;
387 360
388     Py_XDECREF(var_s); 361     Py_XDECREF(var_s);
389     var_s = NULL; 362     var_s = NULL;
t 390   t
391     Py_XDECREF(var_t);
392     var_t = NULL;
393 363
394     Py_XDECREF(var_local_value); 364     Py_XDECREF(var_local_value);
395     var_local_value = NULL; 365     var_local_value = NULL;
396 366
397     // Re-raise. 367     // Re-raise.