Construct FunctionEmpty

Performance Diagrams

Construct FunctionEmpty 0020000002000000400000040000006000000600000080000008000000100000001000000012000000120000001400000014000000160000001600000018000000180000002000000020000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)2167974288.95192307692307257.0CPython 2.71900000242.31730769230768482.4583358013706Nuitka (master)1900000395.6826923076923482.4583358013706Nuitka (develop)1900000549.0480769230769482.4583358013706Nuitka (factory)Construct FunctionEmptyTicks Construct FunctionEmpty 00200000020000004000000400000060000006000000800000080000001000000010000000120000001200000014000000140000001600000016000000180000001800000020000000200000002200000022000000CPython 3.8Nuitka (master)Nuitka (develop)Nuitka (factory)2322004388.95192307692307257.0CPython 3.81899622242.31730769230768483.89897842036396Nuitka (master)1900000395.6826923076923483.89495561922683Nuitka (develop)1900000549.0480769230769483.89495561922683Nuitka (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
154 154
155             exception_lineno = 29; 155             exception_lineno = 29;
156             type_description_1 = "o"; 156             type_description_1 = "o";
157             goto frame_exception_exit_1; 157             goto frame_exception_exit_1;
158         } 158         }
t 159     } t
160     {
161         PyObject *tmp_called_name_1;
162         PyObject *tmp_call_result_1;
163         CHECK_OBJECT(par_called);
164         tmp_called_name_1 = par_called;
165         frame_8dfb11c645a280bb36413037e0e9a9d3->m_frame.f_lineno = 32;
166         tmp_call_result_1 = CALL_FUNCTION_NO_ARGS(tmp_called_name_1);
167         if (tmp_call_result_1 == NULL) {
168             assert(ERROR_OCCURRED());
169  
170             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
171  
172  
173             exception_lineno = 32;
174             type_description_1 = "o";
175             goto frame_exception_exit_1;
176         }
177         Py_DECREF(tmp_call_result_1);
178     } 159     }
179 160
180 #if 0 161 #if 0
181     RESTORE_FRAME_EXCEPTION(frame_8dfb11c645a280bb36413037e0e9a9d3); 162     RESTORE_FRAME_EXCEPTION(frame_8dfb11c645a280bb36413037e0e9a9d3);
182 #endif 163 #endif