Performance of method calls
Bill Baxter
wbaxter at gmail.com
Wed Nov 29 23:57:14 PST 2006
Daniel Keep wrote:
> Bill Baxter wrote:
>
> As for putting code representative of what it'll be doing... I can't at
> this stage since I'm still building the utility libraries. That
> representative code doesn't exist yet.
You can at least put in a loop that adds a bunch of numbers up.
Or writes to elements in an array passed in or something like that.
I think D won't inline anything with a loop, so that would also help to
rule out the inlining affecting results.
Another thing the D optimizer does, though, (reportedly) is to turn
virtual calls into non-virtual ones when the actual class is known at
compile time, so it that could affect your results too.
--bb
More information about the Digitalmars-d
mailing list