Construct FunctionEmpty

Performance Diagrams

Construct FunctionEmpty 0020000002000000400000040000006000000600000080000008000000100000001000000012000000120000001400000014000000160000001600000018000000180000002000000020000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)2167973888.95192307692307257.0CPython 2.71900000242.31730769230768482.45833180555684Nuitka (master)1900000395.6826923076923482.45833180555684Nuitka (develop)1900000549.0480769230769482.45833180555684Nuitka (factory)Construct FunctionEmptyTicks Construct FunctionEmpty 002000000200000040000004000000600000060000008000000800000010000000100000001200000012000000140000001400000016000000160000001800000018000000200000002000000022000000220000002400000024000000CPython 3.5Nuitka (master)Nuitka (develop)Nuitka (factory)2486399288.95192307692307257.0CPython 3.51900000242.31730769230768485.2318830936165Nuitka (master)1900000395.6826923076923485.2318830936165Nuitka (develop)1900000549.0480769230769485.2318830936165Nuitka (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
153 153
154             exception_lineno = 29; 154             exception_lineno = 29;
155             type_description_1 = "o"; 155             type_description_1 = "o";
156             goto frame_exception_exit_1; 156             goto frame_exception_exit_1;
157         } 157         }
t 158     } t
159     {
160         PyObject *tmp_called_name_1;
161         PyObject *tmp_call_result_1;
162         CHECK_OBJECT(par_called);
163         tmp_called_name_1 = par_called;
164         frame_a064e3544c4d829f3f5edb3355b0e7d4->m_frame.f_lineno = 32;
165         tmp_call_result_1 = CALL_FUNCTION_NO_ARGS(tmp_called_name_1);
166         if (tmp_call_result_1 == NULL) {
167             assert(ERROR_OCCURRED());
168  
169             FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb);
170  
171  
172             exception_lineno = 32;
173             type_description_1 = "o";
174             goto frame_exception_exit_1;
175         }
176         Py_DECREF(tmp_call_result_1);
177     } 158     }
178 159
179 #if 0 160 #if 0
180     RESTORE_FRAME_EXCEPTION(frame_a064e3544c4d829f3f5edb3355b0e7d4); 161     RESTORE_FRAME_EXCEPTION(frame_a064e3544c4d829f3f5edb3355b0e7d4);
181 #endif 162 #endif