Construct CallCompiledInstanceMethodPosArgsVariable_27

Performance Diagrams

Construct CallCompiledInstanceMethodPosArgsVariable_27 002000000020000000400000004000000060000000600000008000000080000000100000000100000000120000000120000000140000000140000000160000000160000000180000000180000000200000000200000000220000000220000000240000000240000000260000000260000000CPython 2.7Nuitka (historic)Nuitka (master)Nuitka (develop)Nuitka (factory)27312782772.9230769230769257.00000000000006CPython 2.7104799836194.46153846153845409.29658835714315Nuitka (historic)91301426316.0421.5094222360073Nuitka (master)91300848437.53846153846143421.50994518782034Nuitka (develop)91300884559.0769230769231421.5099126164271Nuitka (factory)Construct CallCompiledInstanceMethodPosArgsVariable_27Ticks

Source Code with Construct

from __future__ import print_function

class C:
    def compiled_method(self, a,b,c,d,e,f):
        return a, b, c, d, e, f

def getUnknownValue():
    return 8

def calledRepeatedly():
    a = getUnknownValue()
    b = getUnknownValue()
    c = getUnknownValue()
    d = getUnknownValue()
    e = getUnknownValue()
    f = getUnknownValue()

    inst = C()

    # This is supposed to make a call to a non-compiled function, which is
    # being optimized separately.
# construct_begin
    inst.compiled_method(a, b, c, d, e, f)
    inst.compiled_method(a, c, b, d, e, f)
    inst.compiled_method(a, b, c, d, f, e)
# construct_alternative



for x in xrange(50000):
    calledRepeatedly()

print("OK.")

Source Code without Construct

from __future__ import print_function

class C:
    def compiled_method(self, a,b,c,d,e,f):
        return a, b, c, d, e, f

def getUnknownValue():
    return 8

def calledRepeatedly():
    a = getUnknownValue()
    b = getUnknownValue()
    c = getUnknownValue()
    d = getUnknownValue()
    e = getUnknownValue()
    f = getUnknownValue()

    inst = C()

    # This is supposed to make a call to a non-compiled function, which is
    # being optimized separately.
# construct_begin



# construct_alternative
    pass
# construct_end

for x in xrange(50000):
    calledRepeatedly()

print("OK.")

Context Diff of Source Code


Construct
Baseline
37     inst = C() 37     inst = C()
38 38
39     # This is supposed to make a call to a non-compiled function, which is 39     # This is supposed to make a call to a non-compiled function, which is
40     # being optimized separately. 40     # being optimized separately.
41 # construct_begin 41 # construct_begin
n 42     inst.compiled_method(a, b, c, d, e, f) n
43     inst.compiled_method(a, c, b, d, e, f)
44     inst.compiled_method(a, b, c, d, f, e)
45 # construct_alternative
46 42
47 43
t t 44  
45 # construct_alternative
46     pass
47 # construct_end
48 48
49 for x in xrange(50000): 49 for x in xrange(50000):
50     calledRepeatedly() 50     calledRepeatedly()
51 51
52 print("OK.") 52 print("OK.")