Construct GeneratorExpressionUsage

Performance Diagrams

Construct GeneratorExpressionUsage 00100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000100000000100000000110000000110000000120000000120000000130000000130000000140000000140000000150000000150000000CPython 3.10Nuitka (main)Nuitka (develop)Nuitka (factory)15829306688.11538461538461257.0CPython 3.1082949930240.03846153846155374.6201112357583Nuitka (main)83750050391.96153846153845373.3710232843097Nuitka (develop)83749948543.8846153846154373.3711825191383Nuitka (factory)Construct GeneratorExpressionUsageTicks Construct GeneratorExpressionUsage 00100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000100000000100000000110000000110000000120000000120000000130000000130000000140000000140000000150000000150000000CPython 3.8Nuitka (main)Nuitka (develop)Nuitka (factory)15617563288.11538461538461257.0CPython 3.882150023240.03846153846155374.13009645078995Nuitka (main)82949046391.96153846153845372.8658091004974Nuitka (develop)82949231543.8846153846154372.86551637655856Nuitka (factory)Construct GeneratorExpressionUsageTicks Construct GeneratorExpressionUsage 00100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000100000000100000000110000000110000000120000000120000000130000000130000000140000000140000000150000000150000000CPython 2.7Nuitka (main)Nuitka (develop)Nuitka (factory)15388334288.11538461538461257.0CPython 2.790107982240.03846153846155359.4144160801019Nuitka (main)91707982391.96153846153845356.8450371580831Nuitka (develop)91707982543.8846153846154356.8450371580831Nuitka (factory)Construct GeneratorExpressionUsageTicks

Source Code with Construct

    # make sure it is still running.
    y = next(gen)

    return x, y


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

    # make sure it is still running.
    y = next(gen)

    return x, y


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
13     # make sure it is started. 13     # make sure it is started.
14     x = next(gen) 14     x = next(gen)
15 15
16     # This should abort. 16     # This should abort.
17     # construct_begin 17     # construct_begin
t 18     all(gen) t 18  
19     # construct_end 19  
20 20
21     # make sure it is still running. 21     # make sure it is still running.
22     y = next(gen) 22     y = next(gen)
23 23
24     return x, y 24     return x, y

Context Diff of Generated Code


Construct
Baseline
115     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; 115     NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL;
116     PyObject *exception_type = NULL; 116     PyObject *exception_type = NULL;
117     PyObject *exception_value = NULL; 117     PyObject *exception_value = NULL;
118     PyTracebackObject *exception_tb = NULL; 118     PyTracebackObject *exception_tb = NULL;
119     NUITKA_MAY_BE_UNUSED int exception_lineno = 0; 119     NUITKA_MAY_BE_UNUSED int exception_lineno = 0;
n 120     NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; n
121     static struct Nuitka_FrameObject *cache_frame_5ccc98682733f584392bf5df4d049c6a = NULL; 120     static struct Nuitka_FrameObject *cache_frame_5ccc98682733f584392bf5df4d049c6a = NULL;
122     PyObject *tmp_return_value = NULL; 121     PyObject *tmp_return_value = NULL;
123     PyObject *exception_keeper_type_1; 122     PyObject *exception_keeper_type_1;
124     PyObject *exception_keeper_value_1; 123     PyObject *exception_keeper_value_1;
125     PyTracebackObject *exception_keeper_tb_1; 124     PyTracebackObject *exception_keeper_tb_1;
235             exception_lineno = 14; 234             exception_lineno = 14;
236             goto frame_exception_exit_1; 235             goto frame_exception_exit_1;
237         } 236         }
238         assert(var_x == NULL); 237         assert(var_x == NULL);
239         var_x = tmp_assign_source_3; 238         var_x = tmp_assign_source_3;
t 240     } t
241     {
242         PyObject *tmp_all_arg_1;
243         PyObject *tmp_capi_result_1;
244         CHECK_OBJECT(var_gen);
245         tmp_all_arg_1 = var_gen;
246         tmp_capi_result_1 = BUILTIN_ALL(tstate, tmp_all_arg_1);
247         if (tmp_capi_result_1 == NULL) {
248             assert(HAS_ERROR_OCCURRED(tstate));
249  
250             FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb);
251  
252  
253             exception_lineno = 18;
254             type_description_1 = "ooo";
255             goto frame_exception_exit_1;
256         }
257         Py_DECREF(tmp_capi_result_1);
258     } 239     }
259     { 240     {
260         PyObject *tmp_assign_source_4; 241         PyObject *tmp_assign_source_4;
261         PyObject *tmp_value_value_2; 242         PyObject *tmp_value_value_2;
262         CHECK_OBJECT(var_gen); 243         CHECK_OBJECT(var_gen);