Construct FunctionEmpty

Performance Diagrams

Construct FunctionEmpty 0020000002000000400000040000006000000600000080000008000000100000001000000012000000120000001400000014000000160000001600000018000000180000002000000020000000220000002200000024000000240000002600000026000000CPython 3.10Nuitka (main)Nuitka (develop)Nuitka (factory)2663171888.95192307692307257.0CPython 3.102700043242.31730769230768479.0617187413664Nuitka (main)2699947395.6826923076923479.0626095241887Nuitka (develop)2700209549.0480769230769479.0601784294028Nuitka (factory)Construct FunctionEmptyTicks Construct FunctionEmpty 00200000020000004000000400000060000006000000800000080000001000000010000000120000001200000014000000140000001600000016000000180000001800000020000000200000002200000022000000CPython 3.8Nuitka (main)Nuitka (develop)Nuitka (factory)2227154388.95192307692307257.0CPython 3.82699929242.31730769230768474.1581430686615Nuitka (main)2700016395.6826923076923474.15717775438304Nuitka (develop)2699970549.0480769230769474.1576881504383Nuitka (factory)Construct FunctionEmptyTicks Construct FunctionEmpty 0020000002000000400000040000006000000600000080000008000000100000001000000012000000120000001400000014000000160000001600000018000000180000002000000020000000CPython 2.7Nuitka (main)Nuitka (develop)Nuitka (factory)2128017688.95192307692307257.0CPython 2.72700000242.31730769230768472.76171825183866Nuitka (main)2700000395.6826923076923472.76171825183866Nuitka (develop)2699973549.0480769230769472.76203178850227Nuitka (factory)Construct FunctionEmptyTicks

Source Code with Construct

    # construct_end

    return called


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

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

    return called


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

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 def calledRepeatedly(called): 14 def calledRepeatedly(called):
15     # Force a frame for now 15     # Force a frame for now
16     module_var 16     module_var
17 17
18     # construct_begin 18     # construct_begin
t 19     called() t 19  
20     # construct_end 20  
21 21
22     return called 22     return called
23 23
24 24
25 for x in itertools.repeat(None, 50000): 25 for x in itertools.repeat(None, 50000):

Context Diff of Generated Code


Construct
Baseline
163             exception_lineno = 16; 163             exception_lineno = 16;
164             type_description_1 = "o"; 164             type_description_1 = "o";
165             goto frame_exception_exit_1; 165             goto frame_exception_exit_1;
166         } 166         }
167     } 167     }
t 168     { t
169         PyObject *tmp_called_value_1;
170         PyObject *tmp_call_result_1;
171         CHECK_OBJECT(par_called);
172         tmp_called_value_1 = par_called;
173         frame_d05bb6cc0f87d202ef1731eaf6528438->m_frame.f_lineno = 19;
174         tmp_call_result_1 = CALL_FUNCTION_NO_ARGS(tstate, tmp_called_value_1);
175         if (tmp_call_result_1 == NULL) {
176             assert(HAS_ERROR_OCCURRED(tstate));
177  
178             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
179  
180  
181             exception_lineno = 19;
182             type_description_1 = "o";
183             goto frame_exception_exit_1;
184         }
185         Py_DECREF(tmp_call_result_1);
186     }
187 168
188 169
189     // Put the previous frame back on top. 170     // Put the previous frame back on top.
190     popFrameStack(tstate); 171     popFrameStack(tstate);
191 172