On 6 January 2012 00:03, Walter Bright <[email protected]> wrote: > On 1/5/2012 1:43 PM, Manu wrote: >> >> On 5 January 2012 23:30, Walter Bright <[email protected] >> >> <mailto:[email protected]>> wrote: >> >> On 1/5/2012 8:49 AM, Manu wrote: >> >> I also wonder if the D language provides some opportunities for >> optimisation >> that aren't expressible in other languages, >> >> >> There are some. One that is currently being exploited by the optimizer >> and >> back end is the existence of pure functions. >> >> >> Does GDC currently support these same optimisations, or is this a DMD >> special power? > > > I don't know what GDC does.
GDC ties D optimisations to function attributes of GCC, so you'll have do you some reading up on the meaning. :) There are three levels of purity, these are matched to are const, pure and novops attributes. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
