Which optimisations are are easier or perhaps only possible in the frontend ?

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 11 04:44:24 PST 2014


"Manu via Digitalmars-d"  wrote in message 
news:mailman.3072.1418300450.9932.digitalmars-d at puremagic.com...

> I've often thought one of the biggest wins that would seem to affect
> my code would be comprehensive value range propagation.
> assert's and contracts can give value range information to the
> compiler, also comparison statements, bit masks, casts, etc, can
> truncate the possible value range, which can create many opportunities
> for optimisations. It would also be really nice to eliminate errors
> associated with down-casting.

I'd be very interested to see the frontend using (more) information from 
asserts/preconditions to optimize code.  There's a huge amount of potential 
there. 



More information about the Digitalmars-d mailing list