What does 'inline' mean?

Jan Hönig hrominium at gmail.com
Mon Jun 8 12:35:01 UTC 2020


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.


More information about the Digitalmars-d mailing list