Construct OperationAttributeLookup

Performance Diagrams

Construct OperationAttributeLookup 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000900000090000001000000010000000110000001100000012000000120000001300000013000000CPython 3.10Nuitka (main)Nuitka (develop)Nuitka (factory)1361836188.95192307692307257.0CPython 3.109550213242.31730769230768330.81959970750574Nuitka (main)9550266395.6826923076923330.8186379827149Nuitka (develop)9550089549.0480769230769330.8218497806014Nuitka (factory)Construct OperationAttributeLookupTicks Construct OperationAttributeLookup 00100000010000002000000200000030000003000000400000040000005000000500000060000006000000CPython 3.8Nuitka (main)Nuitka (develop)Nuitka (factory)689147289.78846153846155257.0CPython 3.85099934244.59615384615387321.2412247953814Nuitka (main)5099958399.4038461538462321.24036419996287Nuitka (develop)5099931554.2115384615385321.2413323698088Nuitka (factory)Construct OperationAttributeLookupTicks Construct OperationAttributeLookup 00100000010000002000000200000030000003000000400000040000005000000500000060000006000000CPython 2.7Nuitka (main)Nuitka (develop)Nuitka (factory)639345889.78846153846155257.0CPython 2.74550000244.59615384615387328.25202553802774Nuitka (main)4550000399.4038461538462328.25202553802774Nuitka (develop)4550000554.2115384615385328.25202553802774Nuitka (factory)Construct OperationAttributeLookupTicks

Source Code with Construct

    # construct_end
    s.append

    return s, local_value


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

print("OK.")

#     Python test originally created or extracted from other peoples work. The
#     parts from me are licensed as below. It is at least Free Software where
#     it's copied from other people. In these cases, that will normally be
#     indicated.
#
#     Licensed under the Apache License, Version 2.0 (the "License");
#     you may not use this file except in compliance with the License.
#     You may obtain a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#     Unless required by applicable law or agreed to in writing, software
#     distributed under the License is distributed on an "AS IS" BASIS,
#     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#     See the License for the specific language governing permissions and
#     limitations under the License.

Source Code without Construct

    s.append

    return s, local_value


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

print("OK.")

#     Python test originally created or extracted from other peoples work. The
#     parts from me are licensed as below. It is at least Free Software where
#     it's copied from other people. In these cases, that will normally be
#     indicated.
#
#     Licensed under the Apache License, Version 2.0 (the "License");
#     you may not use this file except in compliance with the License.
#     You may obtain a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#     Unless required by applicable law or agreed to in writing, software
#     distributed under the License is distributed on an "AS IS" BASIS,
#     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#     See the License for the specific language governing permissions and
#     limitations under the License.

Context Diff of Source Code


Construct
Baseline
14     local_value = module_value1 14     local_value = module_value1
15 15
16     s = module_value1 16     s = module_value1
17     s.append 17     s.append
18     # construct_begin 18     # construct_begin
t 19     s.append t 19  
20     # construct_end 20  
21     s.append 21     s.append
22 22
23     return s, local_value 23     return s, local_value
24 24
25 25

Context Diff of Generated Code


Construct
Baseline
238             assert(HAS_ERROR_OCCURRED(tstate)); 238             assert(HAS_ERROR_OCCURRED(tstate));
239 239
240             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb); 240             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
241 241
242 242
n 243             exception_lineno = 19; n
244             type_description_1 = "oo";
245             goto frame_exception_exit_1;
246         }
247         Py_DECREF(tmp_attribute_value_2);
248     }
249     {
250         PyObject *tmp_expression_value_3;
251         PyObject *tmp_attribute_value_3;
252         CHECK_OBJECT(var_s);
253         tmp_expression_value_3 = var_s;
254         tmp_attribute_value_3 = LOOKUP_ATTRIBUTE(tstate, tmp_expression_value_3, mod_consts[1]);
255         if (tmp_attribute_value_3 == NULL) {
256             assert(HAS_ERROR_OCCURRED(tstate));
257  
258             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
259  
260  
261             exception_lineno = 21; 243             exception_lineno = 21;
262             type_description_1 = "oo"; 244             type_description_1 = "oo";
263             goto frame_exception_exit_1; 245             goto frame_exception_exit_1;
264         } 246         }
t 265         Py_DECREF(tmp_attribute_value_3); t 247         Py_DECREF(tmp_attribute_value_2);
266     } 248     }
267 249
268 250
269     // Put the previous frame back on top. 251     // Put the previous frame back on top.
270     popFrameStack(tstate); 252     popFrameStack(tstate);