[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] [supercollider/supercollider] bf8c91: class library: bitTest method minor speed improvem...





On 04.11.2013, at 17:19, Julian Rohrhuber <julian.rohrhuber@xxxxxxxxxxxxxxxxxx> wrote:

> 
> On 04.11.2013, at 15:56, Jonatan Liljedahl <lijon@xxxxxxxxxxxx> wrote:
> 
>> Would it be possible to create real method "aliases", that would just
>> forward to another method without actually parsing and re-passing the
>> args?
>> 
> 
> Many optimisations seem to be in place, if you look into PyrMessage.cpp:
> HOT void sendMessage(VMGlobals *g, PyrSymbol *selector, long numArgsPushed)
> 

But it seems that the optimisations don't kick in:

DispTest {

	*test { |x, y, z|
		^DispTest2.test(x, y, z)
	}


}

DispTest2 {

	*test { |x, y, z|
		^x + y + z
	}

}

DispTest3 : DispTest {

	*test { |x, y, z|
		^super.test(x, y, z)
	}

}


/*
bench { 1000.do { DispTest.test(1, 1, 1) } };
bench { 1000.do { DispTest2.test(1, 1, 1) } };
bench { 1000.do { DispTest3.test(1, 1, 1) } };
*/

time to run: 0.00066674199933914 seconds.
0.00066674199933914
time to run: 0.00021925700002612 seconds.
0.00021925700002612
time to run: 0.00041615600002842 seconds.
0.00041615600002842

Attachment: tempTest.sc
Description: Binary data