Construct OperationIntegerMul

Performance Diagrams

Construct OperationIntegerMul 00100000010000002000000200000030000003000000400000040000005000000500000060000006000000700000070000008000000800000090000009000000100000001000000011000000110000001200000012000000130000001300000014000000140000001500000015000000CPython 3.10Nuitka (main)Nuitka (develop)Nuitka (factory)1537229288.95192307692307257.0CPython 3.1010199880242.31730769230768340.14847133851157Nuitka (main)10200333395.6826923076923340.1411891928673Nuitka (develop)10200044549.0480769230769340.14583497673306Nuitka (factory)Construct OperationIntegerMulTicks Construct OperationIntegerMul 00100000010000002000000200000030000003000000400000040000005000000500000060000006000000700000070000008000000800000090000009000000100000001000000011000000110000001200000012000000130000001300000014000000140000001500000015000000CPython 3.8Nuitka (main)Nuitka (develop)Nuitka (factory)1539368988.95192307692307257.0CPython 3.810650266242.31730769230768333.14632197899164Nuitka (main)10651863395.6826923076923333.12068528662826Nuitka (develop)10649732549.0480769230769333.15489429816637Nuitka (factory)Construct OperationIntegerMulTicks Construct OperationIntegerMul 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000800000080000009000000900000010000000100000001100000011000000CPython 2.7Nuitka (main)Nuitka (develop)Nuitka (factory)1143347788.95192307692307257.0CPython 2.72897788242.31730769230768441.4845684468782Nuitka (main)2897792395.6826923076923441.48448199360257Nuitka (develop)2897858549.0480769230769441.48305551455474Nuitka (factory)Construct OperationIntegerMulTicks

Source Code with Construct

    # construct_end

    return s, t, local_value


for x in itertools.repeat(None, 50000):
    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

    return s, t, local_value


for x in itertools.repeat(None, 50000):
    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
14     local_value = module_value1 14     local_value = module_value1
15 15
16     s = module_value1 16     s = module_value1
17     t = module_value2 17     t = module_value2
18     # construct_begin 18     # construct_begin
t 19     t = s * t t 19  
20     # construct_end 20  
21 21
22     return s, t, local_value 22     return s, t, local_value
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
230             goto frame_exception_exit_1; 230             goto frame_exception_exit_1;
231         } 231         }
232         assert(var_t == NULL); 232         assert(var_t == NULL);
233         Py_INCREF(tmp_assign_source_3); 233         Py_INCREF(tmp_assign_source_3);
234         var_t = tmp_assign_source_3; 234         var_t = tmp_assign_source_3;
n 235     } n
236     {
237         PyObject *tmp_assign_source_4;
238         PyObject *tmp_mult_expr_left_1;
239         PyObject *tmp_mult_expr_right_1;
240         CHECK_OBJECT(var_s);
241         tmp_mult_expr_left_1 = var_s;
242         CHECK_OBJECT(var_t);
243         tmp_mult_expr_right_1 = var_t;
244         tmp_assign_source_4 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_mult_expr_left_1, tmp_mult_expr_right_1);
245         if (tmp_assign_source_4 == NULL) {
246             assert(HAS_ERROR_OCCURRED(tstate));
247  
248             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
249  
250  
251             exception_lineno = 19;
252             type_description_1 = "ooo";
253             goto frame_exception_exit_1;
254         }
255         {
256             PyObject *old = var_t;
257             assert(old != NULL);
258             var_t = tmp_assign_source_4;
259             Py_DECREF(old);
260         }
261  
262     } 235     }
263 236
264 237
265     // Put the previous frame back on top. 238     // Put the previous frame back on top.
266     popFrameStack(tstate); 239     popFrameStack(tstate);
344 317
345     Py_XDECREF(var_local_value); 318     Py_XDECREF(var_local_value);
346     var_local_value = NULL; 319     var_local_value = NULL;
347     Py_XDECREF(var_s); 320     Py_XDECREF(var_s);
348     var_s = NULL; 321     var_s = NULL;
t 349     Py_XDECREF(var_t); t
350     var_t = NULL;
351     // Re-raise. 322     // Re-raise.
352     exception_type = exception_keeper_type_1; 323     exception_type = exception_keeper_type_1;
353     exception_value = exception_keeper_value_1; 324     exception_value = exception_keeper_value_1;
354     exception_tb = exception_keeper_tb_1; 325     exception_tb = exception_keeper_tb_1;
355     exception_lineno = exception_keeper_lineno_1; 326     exception_lineno = exception_keeper_lineno_1;