Construct OperationAttributeLookup

Performance Diagrams

Construct OperationAttributeLookup 001000000100000020000002000000300000030000004000000400000050000005000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)582147789.78846153846155257.0CPython 2.74100000244.59615384615387330.07483151810766Nuitka (master)4100000399.4038461538462330.07483151810766Nuitka (develop)4100000554.2115384615385330.07483151810766Nuitka (factory)Construct OperationAttributeLookupTicks Construct OperationAttributeLookup 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000CPython 3.8Nuitka (master)Nuitka (develop)Nuitka (factory)794129989.78846153846155257.0CPython 3.85650000244.59615384615387328.30007743743766Nuitka (master)5650000399.4038461538462328.30007743743766Nuitka (develop)5650000554.2115384615385328.30007743743766Nuitka (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
237             assert(ERROR_OCCURRED()); 237             assert(ERROR_OCCURRED());
238 238
239             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 239             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
240 240
241 241
n 242             exception_lineno = 33; n
243             type_description_1 = "oo";
244             goto frame_exception_exit_1;
245         }
246         Py_DECREF(tmp_attribute_value_2);
247     }
248     {
249         PyObject *tmp_expression_name_3;
250         PyObject *tmp_attribute_value_3;
251         CHECK_OBJECT(var_s);
252         tmp_expression_name_3 = var_s;
253         tmp_attribute_value_3 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[1]);
254         if (tmp_attribute_value_3 == NULL) {
255             assert(ERROR_OCCURRED());
256  
257             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
258  
259  
260             exception_lineno = 35; 242             exception_lineno = 35;
261             type_description_1 = "oo"; 243             type_description_1 = "oo";
262             goto frame_exception_exit_1; 244             goto frame_exception_exit_1;
263         } 245         }
t 264         Py_DECREF(tmp_attribute_value_3); t 246         Py_DECREF(tmp_attribute_value_2);
265     } 247     }
266 248
267 #if 0 249 #if 0
268     RESTORE_FRAME_EXCEPTION(frame_a3ba8dc60d66aec96d8ca5f7f506a56c); 250     RESTORE_FRAME_EXCEPTION(frame_a3ba8dc60d66aec96d8ca5f7f506a56c);
269 #endif 251 #endif