On 26 July 2012 23:07, Joseph Rushton Wakeling
<[email protected]> wrote:
> On 26/07/12 20:27, David Nadlinger wrote:
>>
>> GDC probably performs inlining by default on -O2/-O3, just like LDC does.
>
>
> I was surprised that using -inline alone (without any optimization option)
> doesn't produce any meaningful improvement.  It cuts maybe 1s off the
> DMD-compiled runtime, but it's not clear to me that actually corresponds to
> a reliable difference.  Perhaps GDC just ignores the -inline flag ... ?
>

-inline is mapped to -finline-functions in GDC.  Inlining is possibly
done, but only in the backend.

Some extra notes to bear in mind about GDC.
1) All methods and function literals are marked as 'inline' by default.
2) Cross module inlining does not occur if you are compiling one-at-a-time.


Regards
-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';

Reply via email to