Construct OperationIntegerPower

Performance Diagrams

Construct OperationIntegerPower 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000800000080000009000000900000010000000100000001100000011000000120000001200000013000000130000001400000014000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)1468357588.95192307692307257.0CPython 2.76750000242.31730769230768390.51710584786065Nuitka (master)6650000395.6826923076923392.2000433110832Nuitka (develop)6650000549.0480769230769392.2000433110832Nuitka (factory)Construct OperationIntegerPowerTicks Construct OperationIntegerPower 00100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000100000000100000000110000000110000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)11522824588.11538461538461257.0CPython 3.5109350000240.03846153846155269.60632559350756Nuitka (master)109350000391.96153846153845269.60632559350756Nuitka (develop)109350000543.8846153846154269.60632559350756Nuitka (factory)Construct OperationIntegerPowerTicks

Source Code with Construct

module_value1 = -1
module_value2 = 17

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 = -1
module_value2 = 17

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
189             goto frame_exception_exit_1; 189             goto frame_exception_exit_1;
190         } 190         }
191         assert(var_t == NULL); 191         assert(var_t == NULL);
192         Py_INCREF(tmp_assign_source_3); 192         Py_INCREF(tmp_assign_source_3);
193         var_t = tmp_assign_source_3; 193         var_t = tmp_assign_source_3;
n 194     } n
195     {
196         PyObject *tmp_assign_source_4;
197         PyObject *tmp_left_name_1;
198         PyObject *tmp_right_name_1;
199         CHECK_OBJECT(var_s);
200         tmp_left_name_1 = var_s;
201         CHECK_OBJECT(var_t);
202         tmp_right_name_1 = var_t;
203         tmp_assign_source_4 = BINARY_OPERATION_POW_OBJECT_OBJECT_OBJECT(tmp_left_name_1, tmp_right_name_1);
204         if (tmp_assign_source_4 == NULL) {
205             assert(ERROR_OCCURRED());
206  
207             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
208  
209  
210             exception_lineno = 33;
211             type_description_1 = "ooo";
212             goto frame_exception_exit_1;
213         }
214         {
215             PyObject *old = var_t;
216             assert(old != NULL);
217             var_t = tmp_assign_source_4;
218             Py_DECREF(old);
219         }
220  
221     } 194     }
222 195
223 #if 0 196 #if 0
224     RESTORE_FRAME_EXCEPTION(frame_5a218d8aff5d35babe851e415f6ed6ae); 197     RESTORE_FRAME_EXCEPTION(frame_5a218d8aff5d35babe851e415f6ed6ae);
225 #endif 198 #endif
312 285
313     Py_XDECREF(var_local_value); 286     Py_XDECREF(var_local_value);
314     var_local_value = NULL; 287     var_local_value = NULL;
315     Py_XDECREF(var_s); 288     Py_XDECREF(var_s);
316     var_s = NULL; 289     var_s = NULL;
t 317     Py_XDECREF(var_t); t
318     var_t = NULL;
319     // Re-raise. 290     // Re-raise.
320     exception_type = exception_keeper_type_1; 291     exception_type = exception_keeper_type_1;
321     exception_value = exception_keeper_value_1; 292     exception_value = exception_keeper_value_1;
322     exception_tb = exception_keeper_tb_1; 293     exception_tb = exception_keeper_tb_1;
323     exception_lineno = exception_keeper_lineno_1; 294     exception_lineno = exception_keeper_lineno_1;