Construct InplaceOperationUnicodeAdd_27

Performance Diagrams

Construct InplaceOperationUnicodeAdd_27 004000000400000080000008000000120000001200000016000000160000002000000020000000240000002400000028000000280000003200000032000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)3551450988.95192307692307257.0CPython 2.729305980242.31730769230768300.1998942103006Nuitka (master)29305980395.6826923076923300.1998942103006Nuitka (develop)29305980549.0480769230769300.1998942103006Nuitka (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'
    s += u'lala'
    s += u'lala'
    s += u'lala'
    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     s += u'lala' 37  
38     s += u'lala' 38  
39     s += u'lala' 39  
40     s += u'lala' 40  
41 # construct_end 41  
42     s += additiv 42     s += additiv
43 43
44     return s 44     return s
45 45
46 import itertools 46 import itertools