Performance of method calls

Daniel Keep daniel.keep+lists at gmail.com
Wed Nov 29 23:45:43 PST 2006


Daniel Keep wrote:
> Walter Bright wrote:
> 
>> Daniel Keep wrote:
>>
>>> I hooked up a test app which used a loop with 100,000 iterations for 
>>> each call type, and ran that program 100 times, and averaged the 
>>> outputs.
>>
>>
>>
>> What flags did you use to compile it?
> 
> 
> I didn't use any flags; I was worried about the compiler being "smart" 
> and inlining the functions calls which would... well, eliminate them 
> entirely :P
> 
> If there are any flags you can recommend that would give more realistic 
> results, I'd love to know.
> 
>     -- Daniel
> 

I just recompiled and re-ran with some different flags.  The results 
are... interesting.

(Numbers are #1/#2 and #3/#2)

-O: 1.39892 and 3.61384
-O -release: 1.00703 and 1.0163
-O -inline: 1.89054 and 13.4001
-O -release -inline: 1.8257 and 1.00007

Now I've got *no* idea what to think :P

	-- Daniel



More information about the Digitalmars-d mailing list