Construct OperationAttributeLookup

Performance Diagrams

Construct OperationAttributeLookup 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)724789689.78846153846155257.0CPython 2.74974994244.59615384615387334.49408268593766Nuitka (master)4974568399.4038461538462334.50860706016243Nuitka (develop)4974934554.2115384615385334.4961283724482Nuitka (factory)Construct OperationAttributeLookupTicks Construct OperationAttributeLookup 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)791644589.78846153846155257.0CPython 3.55325004244.59615384615387337.89299419412083Nuitka (master)5325078399.4038461538462337.8906842508999Nuitka (develop)5325118554.2115384615385337.88943563294265Nuitka (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
260             assert(ERROR_OCCURRED()); 260             assert(ERROR_OCCURRED());
261 261
262             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); 262             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
263 263
264 264
n 265             exception_lineno = 33; n
266             type_description_1 = "oo";
267             goto frame_exception_exit_1;
268         }
269         Py_DECREF(tmp_attribute_value_2);
270     }
271     {
272         PyObject *tmp_source_name_3;
273         PyObject *tmp_attribute_value_3;
274         CHECK_OBJECT(var_s);
275         tmp_source_name_3 = var_s;
276         tmp_attribute_value_3 = LOOKUP_ATTRIBUTE(tmp_source_name_3, const_str_plain_append);
277         if (tmp_attribute_value_3 == NULL) {
278             assert(ERROR_OCCURRED());
279  
280             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
281  
282  
283             exception_lineno = 35; 265             exception_lineno = 35;
284             type_description_1 = "oo"; 266             type_description_1 = "oo";
285             goto frame_exception_exit_1; 267             goto frame_exception_exit_1;
286         } 268         }
t 287         Py_DECREF(tmp_attribute_value_3); t 269         Py_DECREF(tmp_attribute_value_2);
288     } 270     }
289 271
290 #if 0 272 #if 0
291     RESTORE_FRAME_EXCEPTION(frame_150310f8cade1dd679e58d4086d856d3); 273     RESTORE_FRAME_EXCEPTION(frame_150310f8cade1dd679e58d4086d856d3);
292 #endif 274 #endif