Construct OperationAttributeLookup

Performance Diagrams

Construct OperationAttributeLookup 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)724789689.78846153846155257.0CPython 2.74975006244.59615384615387334.49367354863557Nuitka (master)4975408399.4038461538462334.479967449015Nuitka (develop)4974658554.2115384615385334.5055385303966Nuitka (factory)Construct OperationAttributeLookupTicks Construct OperationAttributeLookup 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)791644589.78846153846155257.0CPython 3.55324954244.59615384615387337.8945549665674Nuitka (master)5325084399.4038461538462337.8904969582063Nuitka (develop)5324966554.2115384615385337.89418038118026Nuitka (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
266             assert(ERROR_OCCURRED()); 266             assert(ERROR_OCCURRED());
267 267
268             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 268             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
269 269
270 270
n 271             exception_lineno = 33; n
272             type_description_1 = "oo";
273             goto frame_exception_exit_1;
274         }
275         Py_DECREF(tmp_attribute_value_2);
276     }
277     {
278         PyObject *tmp_source_name_3;
279         PyObject *tmp_attribute_value_3;
280         CHECK_OBJECT(var_s);
281         tmp_source_name_3 = var_s;
282         tmp_attribute_value_3 = LOOKUP_ATTRIBUTE( tmp_source_name_3, const_str_plain_append );
283         if ( tmp_attribute_value_3 == NULL )
284         {
285             assert(ERROR_OCCURRED());
286  
287             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
288  
289  
290             exception_lineno = 35; 271             exception_lineno = 35;
291             type_description_1 = "oo"; 272             type_description_1 = "oo";
292             goto frame_exception_exit_1; 273             goto frame_exception_exit_1;
293         } 274         }
t 294         Py_DECREF(tmp_attribute_value_3); t 275         Py_DECREF(tmp_attribute_value_2);
295     } 276     }
296 277
297 #if 0 278 #if 0
298     RESTORE_FRAME_EXCEPTION(frame_eb57b373bee2e1ca555732dac68582fd); 279     RESTORE_FRAME_EXCEPTION(frame_eb57b373bee2e1ca555732dac68582fd);
299 #endif 280 #endif