Construct FunctionEmpty

Performance Diagrams

Construct FunctionEmpty 0020000002000000400000040000006000000600000080000008000000100000001000000012000000120000001400000014000000160000001600000018000000180000002000000020000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)2167971688.95192307692307257.0CPython 2.72150803242.31730769230768479.599541761312Nuitka (master)2100000395.6826923076923480.17861774573066Nuitka (develop)2100000549.0480769230769480.17861774573066Nuitka (factory)Construct FunctionEmptyTicks Construct FunctionEmpty 00200000020000004000000400000060000006000000800000080000001000000010000000120000001200000014000000140000001600000016000000180000001800000020000000200000002200000022000000CPython 3.8Nuitka (master)Nuitka (develop)Nuitka (factory)2322015188.95192307692307257.0CPython 3.82401251242.31730769230768478.56059539704245Nuitka (master)2100000395.6826923076923481.7665933567788Nuitka (develop)2100000549.0480769230769481.7665933567788Nuitka (factory)Construct FunctionEmptyTicks

Source Code with Construct

def empty():
    pass

module_var = None

def calledRepeatedly(called):
    # Force a frame for now
    module_var

# construct_begin
    called()
# construct_end

    return called

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

print("OK.")

Source Code without Construct

def empty():
    pass

module_var = None

def calledRepeatedly(called):
    # Force a frame for now
    module_var

# construct_begin



    return called

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

print("OK.")

Context Diff of Source Code


Construct
Baseline
27 def calledRepeatedly(called): 27 def calledRepeatedly(called):
28     # Force a frame for now 28     # Force a frame for now
29     module_var 29     module_var
30 30
31 # construct_begin 31 # construct_begin
t 32     called() t 32  
33 # construct_end 33  
34 34
35     return called 35     return called
36 36
37 import itertools 37 import itertools
38 for x in itertools.repeat(None, 50000): 38 for x in itertools.repeat(None, 50000):

Context Diff of Generated Code


Construct
Baseline
162             exception_lineno = 29; 162             exception_lineno = 29;
163             type_description_1 = "o"; 163             type_description_1 = "o";
164             goto frame_exception_exit_1; 164             goto frame_exception_exit_1;
165         } 165         }
166     } 166     }
t 167     { t
168         PyObject *tmp_called_name_1;
169         PyObject *tmp_call_result_1;
170         CHECK_OBJECT(par_called);
171         tmp_called_name_1 = par_called;
172         frame_ba943002a65188313eef98b7a980f6de->m_frame.f_lineno = 32;
173         tmp_call_result_1 = CALL_FUNCTION_NO_ARGS(tmp_called_name_1);
174         if (tmp_call_result_1 == NULL) {
175             assert(ERROR_OCCURRED());
176  
177             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
178  
179  
180             exception_lineno = 32;
181             type_description_1 = "o";
182             goto frame_exception_exit_1;
183         }
184         Py_DECREF(tmp_call_result_1);
185     }
186 167
187 #if 0 168 #if 0
188     RESTORE_FRAME_EXCEPTION(frame_ba943002a65188313eef98b7a980f6de); 169     RESTORE_FRAME_EXCEPTION(frame_ba943002a65188313eef98b7a980f6de);
189 #endif 170 #endif
190 171