Construct CallCompiledInstanceMethodPosArgsVariable_27

Performance Diagrams

Construct CallCompiledInstanceMethodPosArgsVariable_27 002000000020000000400000004000000060000000600000008000000080000000100000000100000000120000000120000000140000000140000000160000000160000000180000000180000000200000000200000000220000000220000000240000000240000000260000000260000000280000000280000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)29107105088.11538461538461257.0CPython 2.792350930240.03846153846155425.710694123017Nuitka (master)92351056391.96153846153845425.7105871507212Nuitka (develop)92351260543.8846153846154425.71041395748034Nuitka (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



import itertools
for x in itertools.repeat(None, 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

import itertools
for x in itertools.repeat(None, 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 import itertools 49 import itertools
50 for x in itertools.repeat(None, 50000): 50 for x in itertools.repeat(None, 50000):
51     calledRepeatedly() 51     calledRepeatedly()
52 52