Construct OperationAttributeLookup

Performance Diagrams

Construct OperationAttributeLookup 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)822378989.78846153846155257.0CPython 2.74974976244.59615384615387354.62308761064537Nuitka (master)4974994399.4038461538462354.62254673138364Nuitka (develop)4974976554.2115384615385354.62308761064537Nuitka (factory)Construct OperationAttributeLookupTicks Construct OperationAttributeLookup 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)844112989.78846153846155257.0CPython 3.55196952244.59615384615387351.97379404051105Nuitka (master)5199754399.4038461538462351.89176504798024Nuitka (develop)5197352554.2115384615385351.96208397733744Nuitka (factory)Construct OperationAttributeLookupTicks

Source Code with Construct

module_value1 = list()
module_value2 = 3000

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    local_value = module_value1

    s = module_value1
    s.append
# construct_begin
    s.append
# construct_end
    s.append

    return s, local_value

import itertools
for x in itertools.repeat(None, 25000):
    calledRepeatedly()

print("OK.")

Source Code without Construct

module_value1 = list()
module_value2 = 3000

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    local_value = module_value1

    s = module_value1
    s.append
# construct_begin


    s.append

    return s, local_value

import itertools
for x in itertools.repeat(None, 25000):
    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     s.append 31     s.append
32 # construct_begin 32 # construct_begin
t 33     s.append t 33  
34 # construct_end 34  
35     s.append 35     s.append
36 36
37     return s, local_value 37     return s, local_value
38 38
39 import itertools 39 import itertools

Context Diff of Generated Code


Construct
Baseline
271             assert( ERROR_OCCURRED() ); 271             assert( ERROR_OCCURRED() );
272 272
273             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); 273             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
274 274
275 275
n 276             exception_lineno = 33; n
277             type_description_1 = "oo";
278             goto frame_exception_exit_1;
279         }
280         Py_DECREF( tmp_attribute_value_2 );
281     }
282     {
283         PyObject *tmp_source_name_3;
284         PyObject *tmp_attribute_value_3;
285         CHECK_OBJECT( var_s );
286         tmp_source_name_3 = var_s;
287         tmp_attribute_value_3 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_append );
288         if ( tmp_attribute_value_3 == NULL )
289         {
290             assert( ERROR_OCCURRED() );
291  
292             FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
293  
294  
295             exception_lineno = 35; 276             exception_lineno = 35;
296             type_description_1 = "oo"; 277             type_description_1 = "oo";
297             goto frame_exception_exit_1; 278             goto frame_exception_exit_1;
298         } 279         }
t 299         Py_DECREF( tmp_attribute_value_3 ); t 280         Py_DECREF( tmp_attribute_value_2 );
300     } 281     }
301 282
302 #if 0 283 #if 0
303     RESTORE_FRAME_EXCEPTION( frame_cde26899d808215f8e9866255cc30708 ); 284     RESTORE_FRAME_EXCEPTION( frame_cde26899d808215f8e9866255cc30708 );
304 #endif 285 #endif