DMD 0.177 release

Jarrett Billingsley kb3ctd2 at yahoo.com
Tue Dec 12 08:47:00 PST 2006


"Lutger" <lutger.blijdestijn at gmail.com> wrote in message 
news:elmkes$1ult$1 at digitaldaemon.com...

> Can you explain why? 'Rely' in this context doesn't mean the language is 
> broken right? It just means it is slower, but isn't that expected from a 
> non-optimizing compiler anyway?

Yes, I guess that's true.  But if a simple addition i.e.

x = a + b;

Compiled to

mov _TEMP1, a
mov _TEMP2, b
add _TEMP1, _TEMP2
mov x, _TEMP1

Instead of

mov x, a
add x, b

It'd still be semantically correct, but would it make sense?

In the same way, I don't see why the compiler should introduce a needless 
bit-copy of a (possibly large) structure which can *always* be optimized out 
when it would be much simpler to skip the bit-copy in the first place.

It's an optimization which can always be performed, and so should not be an 
optimization.  It should be the default behavior. 





More information about the Digitalmars-d-announce mailing list