Construct OperationAttributeLookup

Performance Diagrams

Construct OperationAttributeLookup 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)829878589.78846153846155257.0CPython 2.74974022244.59615384615387356.0024548774308Nuitka (master)4975114399.4038461538462355.9699380692474Nuitka (develop)4974562554.2115384615385355.9863751371204Nuitka (factory)Construct OperationAttributeLookupTicks Construct OperationAttributeLookup 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)826650589.78846153846155257.0CPython 3.55199996244.59615384615387348.66891581890275Nuitka (master)5199886399.4038461538462348.67220411211827Nuitka (develop)5206402554.2115384615385348.4774175794598Nuitka (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_826dc5da0de1bb9ff0d1f13d03a92b5b ); 284     RESTORE_FRAME_EXCEPTION( frame_826dc5da0de1bb9ff0d1f13d03a92b5b );
304 #endif 285 #endif