Inline optimization

Nicholas Wilson iamthewilsonator at hotmail.com
Tue Feb 26 15:03:45 UTC 2019


On Tuesday, 26 February 2019 at 02:43:36 UTC, Michelle Long wrote:
> Given a function such as a computation that would benefit from 
> running at full speed, is it possible to optimize only that 
> function rather than the full program?
>
> That is, compile with debug but optimize specific code:
>
> pragma(optimize, "O3")
> auto fastAdd(A,B)

Closest I know of for LDC is @fastmath

https://github.com/ldc-developers/druntime/blob/54cb25c7ba2f73ddf83873579d3d9860149f20cc/src/ldc/attributes.d#L158


More information about the Digitalmars-d mailing list