Optimization of simple properties

Jason House jason.james.house at gmail.com
Sat Oct 11 11:59:45 PDT 2008


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?


More information about the Digitalmars-d-learn mailing list