Construct CallCompiledInstanceMethodPosArgsDefaults_27

Performance Diagrams

Construct CallCompiledInstanceMethodPosArgsDefaults_27 002000000020000000400000004000000060000000600000008000000080000000100000000100000000120000000120000000140000000140000000160000000160000000180000000180000000200000000200000000220000000220000000CPython 2.7Nuitka (historic)Nuitka (master)Nuitka (develop)Nuitka (factory)23684557272.9230769230769257.0CPython 2.7114799902194.46153846153845384.33766744303887Nuitka (historic)82151598316.0418.4016279041616Nuitka (master)82151938437.53846153846143418.40127316149085Nuitka (develop)82150860559.0769230769231418.4023979044293Nuitka (factory)Construct CallCompiledInstanceMethodPosArgsDefaults_27Ticks

Source Code with Construct

from __future__ import print_function

class C:
    def compiled_method(self, a = 1, b = 2,c = 3,d = 4,e = 5,f = 6):
        return a, b, c, d, e, f

def calledRepeatedly():
    inst = C()

    # This is supposed to make a call to a non-compiled function, which is
    # being optimized separately.
# construct_begin
    inst.compiled_method()
    inst.compiled_method()
    inst.compiled_method()
# 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 = 1, b = 2,c = 3,d = 4,e = 5,f = 6):
        return a, b, c, d, e, f

def calledRepeatedly():
    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
27     inst = C() 27     inst = C()
28 28
29     # This is supposed to make a call to a non-compiled function, which is 29     # This is supposed to make a call to a non-compiled function, which is
30     # being optimized separately. 30     # being optimized separately.
31 # construct_begin 31 # construct_begin
n 32     inst.compiled_method() n
33     inst.compiled_method()
34     inst.compiled_method()
35 # construct_alternative
36 32
37 33
t t 34  
35 # construct_alternative
36     pass
37 # construct_end
38 38
39 for x in xrange(50000): 39 for x in xrange(50000):
40     calledRepeatedly() 40     calledRepeatedly()
41 41
42 print("OK.") 42 print("OK.")