Construct DictCreation

Performance Diagrams

Construct DictCreation 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000800000080000009000000900000010000000100000001100000011000000120000001200000013000000130000001400000014000000CPython 3.12Nuitka (main)Nuitka (develop)Nuitka (factory)1432862488.95192307692307257.0CPython 3.1213030000242.31730769230768279.39642614885906Nuitka (main)13030000395.6826923076923279.39642614885906Nuitka (develop)13030000549.0480769230769279.39642614885906Nuitka (factory)Construct DictCreationTicks Construct DictCreation 00100000010000002000000200000030000003000000400000040000005000000500000060000006000000700000070000008000000800000090000009000000100000001000000011000000110000001200000012000000CPython 3.11Nuitka (main)Nuitka (develop)Nuitka (factory)1228938488.95192307692307257.0CPython 3.1110250000242.31730769230768298.00800833780295Nuitka (main)10250000395.6826923076923298.00800833780295Nuitka (develop)10250000549.0480769230769298.00800833780295Nuitka (factory)Construct DictCreationTicks Construct DictCreation 00100000010000002000000200000030000003000000400000040000005000000500000060000006000000700000070000008000000800000090000009000000100000001000000011000000110000001200000012000000CPython 3.10Nuitka (main)Nuitka (develop)Nuitka (factory)1230873988.95192307692307257.0CPython 3.108830000242.31730769230768326.84061697640504Nuitka (main)8830000395.6826923076923326.84061697640504Nuitka (develop)8830000549.0480769230769326.84061697640504Nuitka (factory)Construct DictCreationTicks Construct DictCreation 001000000100000020000002000000300000030000004000000400000050000005000000600000060000007000000700000080000008000000900000090000001000000010000000CPython 2.7Nuitka (main)Nuitka (develop)Nuitka (factory)1043271688.95192307692307257.0CPython 2.76630119242.31730769230768347.0705262361506Nuitka (main)6630119395.6826923076923347.0705262361506Nuitka (develop)6630119549.0480769230769347.0705262361506Nuitka (factory)Construct DictCreationTicks

Source Code with Construct

    dict_val3 = module_value3
    dict_val4 = module_value4

    l = 1

    if cond:
        l = {
            dict_key1: dict_val1,
            dict_key2: dict_val2,
            dict_key3: dict_val3,
            dict_key4: dict_val4,
        }

    return (
        l,
        dict_val1,
        dict_val2,
        dict_val3,
        dict_val4,
        dict_key1,
        dict_key2,
        dict_key3,
        dict_key4,
    )


for x in itertools.repeat(None, 10000):
    # construct_begin
    calledRepeatedly(True)
    # construct_alternative



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

    dict_val3 = module_value3
    dict_val4 = module_value4

    l = 1

    if cond:
        l = {
            dict_key1: dict_val1,
            dict_key2: dict_val2,
            dict_key3: dict_val3,
            dict_key4: dict_val4,
        }

    return (
        l,
        dict_val1,
        dict_val2,
        dict_val3,
        dict_val4,
        dict_key1,
        dict_key2,
        dict_key3,
        dict_key4,
    )


for x in itertools.repeat(None, 10000):
    # construct_begin

    # construct_alternative
    calledRepeatedly(False)
    # construct_end

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.