from__future__importprint_functionclassC:defcompiled_method(self,a=1,b=2,c=3,d=4,e=5,f=6):returna,b,c,d,e,fdefcalledRepeatedly():inst=C()# This is supposed to make a call to a compiled method, which is# being optimized separately.# construct_begininst.compiled_method()inst.compiled_method()inst.compiled_method()# construct_alternativeimportitertoolsforxinitertools.repeat(None,50000):calledRepeatedly()print("OK.")
from__future__importprint_functionclassC:defcompiled_method(self,a=1,b=2,c=3,d=4,e=5,f=6):returna,b,c,d,e,fdefcalledRepeatedly():inst=C()# This is supposed to make a call to a compiled method, which is# being optimized separately.# construct_begin# construct_alternativepass# construct_endimportitertoolsforxinitertools.repeat(None,50000):calledRepeatedly()print("OK.")