What does 'inline' mean?
John Colvin
john.loughran.colvin at gmail.com
Mon Jun 8 15:10:13 UTC 2020
On Monday, 8 June 2020 at 12:35:01 UTC, Jan Hönig wrote:
> On Monday, 8 June 2020 at 10:19:16 UTC, Walter Bright wrote:
>>
>> Why does it matter where it is emitted? Why would you want
>> multiple copies of the same function in the binary?
>
> Performance in HPC.
>
> In C++, consider an []operator. There would be a lot of
> function calls inside a kernel (some function with lot of
> loops, one billion iterations of the inner most loop easily).
> If then I have some kind of stencil or any array accesses,
> calling a function each time a top of resolving the current
> pointer would be very costly.
What does this have to do with whether a symbol is emitted?
Emitting a symbol doesn't mean you didn't get inlining.
More information about the Digitalmars-d
mailing list