Optimization of simple properties

Denis Koroskin 2korden at gmail.com
Sat Oct 11 13:33:15 PDT 2008


On Sat, 11 Oct 2008 22:59:45 +0400, Jason House  
<jason.james.house at gmail.com> wrote:

> Last night I changed my code to expose raw variables instead of offering
> properties.  The properties were simply returning a local variable.  I  
> was
> surprised that such a simple and stupid change resulted in a 10% speed up
> for gdc-generated code.
>
> Is this a bug unique to gdc (or the older gdc build that I have)? Is dmd
> smart enough to avoid this kind of problem?

I assume you compile code with inline expansion enabled?


More information about the Digitalmars-d-learn mailing list