Is there any performance penalty for static if?
    Ferhat Kurtulmuş 
    aferust at gmail.com
       
    Wed May 15 22:16:23 UTC 2019
    
    
  
On Wednesday, 15 May 2019 at 22:13:18 UTC, Jonathan M Davis wrote:
> On Wednesday, May 15, 2019 4:03:39 PM MDT Ferhat Kurtulmuş via 
> Digitalmars- d-learn wrote:
>> [...]
>
> If you really want to see what happens (for any piece of code), 
> then you can look at the generated assembly, but static if is 
> completely a compile-time construct. It affects which code ends 
> up in the binary. For instance, if your at function there were 
> instantiated with double, then the resulting function would be
>
> [...]
Thanks a lot! This is what I was exactly expecting.
    
    
More information about the Digitalmars-d-learn
mailing list