Construct InplaceOperationStringAdd

Performance Diagrams

Construct InplaceOperationStringAdd 0010000000100000002000000020000000300000003000000040000000400000005000000050000000CPython 3.10Nuitka (main)Nuitka (develop)Nuitka (factory)5249285588.95192307692307257.0CPython 3.1027589526242.31730769230768374.23492128668676Nuitka (main)27239925395.6826923076923375.880703090266Nuitka (develop)27240161549.0480769230769375.87959209657424Nuitka (factory)Construct InplaceOperationStringAddTicks Construct InplaceOperationStringAdd 001000000010000000200000002000000030000000300000004000000040000000CPython 3.8Nuitka (main)Nuitka (develop)Nuitka (factory)4764734088.95192307692307257.0CPython 3.839159412242.31730769230768301.0212946264722Nuitka (main)39010005395.6826923076923301.7961703754485Nuitka (develop)39369843549.0480769230769299.9299275637988Nuitka (factory)Construct InplaceOperationStringAddTicks Construct InplaceOperationStringAdd 0010000000100000002000000020000000300000003000000040000000400000005000000050000000600000006000000070000000700000008000000080000000CPython 2.7Nuitka (main)Nuitka (develop)Nuitka (factory)4265807688.95192307692307383.84792947107303CPython 2.787650203242.31730769230768257.0Nuitka (main)39269169395.6826923076923393.4023974365467Nuitka (develop)30519889549.0480769230769418.06955870150915Nuitka (factory)Construct InplaceOperationStringAddTicks

Source Code with Construct

    s += additiv

    # construct_begin
    s += additiv
    s += additiv
    s += additiv
    s += additiv
    s += additiv
    # construct_end

    # Prevent optimization into direct return.
    s += additiv

    return s


for x in itertools.repeat(None, 10000):
    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 += additiv

    # construct_begin







    # Prevent optimization into direct return.
    s += additiv

    return s


for x in itertools.repeat(None, 10000):
    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
18     # Add an unknown, making 's' an unknown. 18     # Add an unknown, making 's' an unknown.
19     additiv = additiv_global 19     additiv = additiv_global
20     s += additiv 20     s += additiv
21 21
22     # construct_begin 22     # construct_begin
t 23     s += additiv t 23  
24     s += additiv 24  
25     s += additiv 25  
26     s += additiv 26  
27     s += additiv 27  
28     # construct_end 28  
29 29
30     # Prevent optimization into direct return. 30     # Prevent optimization into direct return.
31     s += additiv 31     s += additiv
32 32
33     return s 33     return s

Context Diff of Generated Code


Construct
Baseline
225             assert(HAS_ERROR_OCCURRED(tstate)); 225             assert(HAS_ERROR_OCCURRED(tstate));
226 226
227             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb); 227             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
228 228
229 229
n 230             exception_lineno = 23; n
231             type_description_1 = "oo";
232             goto frame_exception_exit_1;
233         }
234         tmp_assign_source_3 = tmp_iadd_expr_left_2;
235         var_s = tmp_assign_source_3;
236  
237     }
238     {
239         PyObject *tmp_assign_source_4;
240         PyObject *tmp_iadd_expr_left_3;
241         PyObject *tmp_iadd_expr_right_3;
242         CHECK_OBJECT(var_s);
243         tmp_iadd_expr_left_3 = var_s;
244         CHECK_OBJECT(var_additiv);
245         tmp_iadd_expr_right_3 = var_additiv;
246         tmp_result = INPLACE_OPERATION_ADD_OBJECT_OBJECT(&tmp_iadd_expr_left_3, tmp_iadd_expr_right_3);
247         if (tmp_result == false) {
248             assert(HAS_ERROR_OCCURRED(tstate));
249  
250             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
251  
252  
253             exception_lineno = 24;
254             type_description_1 = "oo";
255             goto frame_exception_exit_1;
256         }
257         tmp_assign_source_4 = tmp_iadd_expr_left_3;
258         var_s = tmp_assign_source_4;
259  
260     }
261     {
262         PyObject *tmp_assign_source_5;
263         PyObject *tmp_iadd_expr_left_4;
264         PyObject *tmp_iadd_expr_right_4;
265         CHECK_OBJECT(var_s);
266         tmp_iadd_expr_left_4 = var_s;
267         CHECK_OBJECT(var_additiv);
268         tmp_iadd_expr_right_4 = var_additiv;
269         tmp_result = INPLACE_OPERATION_ADD_OBJECT_OBJECT(&tmp_iadd_expr_left_4, tmp_iadd_expr_right_4);
270         if (tmp_result == false) {
271             assert(HAS_ERROR_OCCURRED(tstate));
272  
273             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
274  
275  
276             exception_lineno = 25;
277             type_description_1 = "oo";
278             goto frame_exception_exit_1;
279         }
280         tmp_assign_source_5 = tmp_iadd_expr_left_4;
281         var_s = tmp_assign_source_5;
282  
283     }
284     {
285         PyObject *tmp_assign_source_6;
286         PyObject *tmp_iadd_expr_left_5;
287         PyObject *tmp_iadd_expr_right_5;
288         CHECK_OBJECT(var_s);
289         tmp_iadd_expr_left_5 = var_s;
290         CHECK_OBJECT(var_additiv);
291         tmp_iadd_expr_right_5 = var_additiv;
292         tmp_result = INPLACE_OPERATION_ADD_OBJECT_OBJECT(&tmp_iadd_expr_left_5, tmp_iadd_expr_right_5);
293         if (tmp_result == false) {
294             assert(HAS_ERROR_OCCURRED(tstate));
295  
296             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
297  
298  
299             exception_lineno = 26;
300             type_description_1 = "oo";
301             goto frame_exception_exit_1;
302         }
303         tmp_assign_source_6 = tmp_iadd_expr_left_5;
304         var_s = tmp_assign_source_6;
305  
306     }
307     {
308         PyObject *tmp_assign_source_7;
309         PyObject *tmp_iadd_expr_left_6;
310         PyObject *tmp_iadd_expr_right_6;
311         CHECK_OBJECT(var_s);
312         tmp_iadd_expr_left_6 = var_s;
313         CHECK_OBJECT(var_additiv);
314         tmp_iadd_expr_right_6 = var_additiv;
315         tmp_result = INPLACE_OPERATION_ADD_OBJECT_OBJECT(&tmp_iadd_expr_left_6, tmp_iadd_expr_right_6);
316         if (tmp_result == false) {
317             assert(HAS_ERROR_OCCURRED(tstate));
318  
319             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
320  
321  
322             exception_lineno = 27;
323             type_description_1 = "oo";
324             goto frame_exception_exit_1;
325         }
326         tmp_assign_source_7 = tmp_iadd_expr_left_6;
327         var_s = tmp_assign_source_7;
328  
329     }
330     {
331         PyObject *tmp_assign_source_8;
332         PyObject *tmp_iadd_expr_left_7;
333         PyObject *tmp_iadd_expr_right_7;
334         CHECK_OBJECT(var_s);
335         tmp_iadd_expr_left_7 = var_s;
336         CHECK_OBJECT(var_additiv);
337         tmp_iadd_expr_right_7 = var_additiv;
338         tmp_result = INPLACE_OPERATION_ADD_OBJECT_OBJECT(&tmp_iadd_expr_left_7, tmp_iadd_expr_right_7);
339         if (tmp_result == false) {
340             assert(HAS_ERROR_OCCURRED(tstate));
341  
342             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
343  
344  
345             exception_lineno = 31; 230             exception_lineno = 31;
346             type_description_1 = "oo"; 231             type_description_1 = "oo";
347             goto frame_exception_exit_1; 232             goto frame_exception_exit_1;
348         } 233         }
t 349         tmp_assign_source_8 = tmp_iadd_expr_left_7; t 234         tmp_assign_source_3 = tmp_iadd_expr_left_2;
350         var_s = tmp_assign_source_8; 235         var_s = tmp_assign_source_3;
351 236
352     } 237     }
353 238
354 239
355     // Put the previous frame back on top. 240     // Put the previous frame back on top.