Construct OperationIntegerPower

Performance Diagrams

Construct OperationIntegerPower 0020000002000000400000040000006000000600000080000008000000100000001000000012000000120000001400000014000000160000001600000018000000180000002000000020000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)2023913888.95192307692307257.0CPython 2.713000948242.31730769230768345.37669399602055Nuitka (master)13000908395.6826923076923345.3771823871459Nuitka (develop)13000878549.0480769230769345.37754868049Nuitka (factory)Construct OperationIntegerPowerTicks Construct OperationIntegerPower 001000000010000000200000002000000030000000300000004000000040000000500000005000000060000000600000007000000070000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)6367551988.95192307692307286.6601502039869CPython 3.572360642242.31730769230768257.0Nuitka (master)72356199395.6826923076923257.0151730778432Nuitka (develop)72333033549.0480769230769257.0942861818977Nuitka (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
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 = POWER_OPERATION( 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_00621271ad5feaf66c2c29f4e7f81d52 ); 280     RESTORE_FRAME_EXCEPTION( frame_00621271ad5feaf66c2c29f4e7f81d52 );
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.