Construct InplaceOperationUnicodeAdd_27

Performance Diagrams

Construct InplaceOperationUnicodeAdd_27 0010000001000000200000020000003000000300000040000004000000500000050000006000000600000070000007000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)771416989.78846153846155257.0CPython 2.77095388244.59615384615387276.8220060783854Nuitka (master)6557563399.4038461538462294.05067085495034Nuitka (develop)6557745554.2115384615385294.04484067414927Nuitka (factory)Construct InplaceOperationUnicodeAdd_27Ticks

Source Code with Construct

module_value1 = 5

additiv_global = u'*' * 500

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    # Make sure we have a local variable s anyway
    s = u'2'

    additiv = additiv_global

    s += additiv
# construct_begin
    s += u'lala'
# construct_end
    s += additiv

    return s

import itertools
for x in itertools.repeat(None, 5000):
    calledRepeatedly()

print("OK.")

Source Code without Construct

module_value1 = 5

additiv_global = u'*' * 500

def calledRepeatedly():
    # Force frame and eliminate forward propagation (currently).
    module_value1

    # Make sure we have a local variable s anyway
    s = u'2'

    additiv = additiv_global

    s += additiv
# construct_begin


    s += additiv

    return s

import itertools
for x in itertools.repeat(None, 5000):
    calledRepeatedly()

print("OK.")

Context Diff of Source Code


Construct
Baseline
31 31
32     additiv = additiv_global 32     additiv = additiv_global
33 33
34     s += additiv 34     s += additiv
35 # construct_begin 35 # construct_begin
t 36     s += u'lala' t 36  
37 # construct_end 37  
38     s += additiv 38     s += additiv
39 39
40     return s 40     return s
41 41
42 import itertools 42 import itertools