Construct CallCompiledInstanceMethodPosArgsVariable_27

Performance Diagrams

Construct CallCompiledInstanceMethodPosArgsVariable_27 002000000020000000400000004000000060000000600000008000000080000000100000000100000000120000000120000000140000000140000000160000000160000000180000000180000000200000000200000000220000000220000000240000000240000000260000000260000000CPython 2.7Nuitka (master)Nuitka (develop)Nuitka (factory)27312843588.11538461538461257.0CPython 2.791301408240.03846153846155421.50962240741035Nuitka (master)91301390391.96153846153845421.5096386930707Nuitka (develop)91301396543.8846153846154421.5096332645172Nuitka (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