Standard way to supply hints to branches

Walter Bright newshound2 at digitalmars.com
Sat Aug 24 02:24:23 UTC 2024


On 8/23/2024 1:56 AM, Iain Buclaw wrote:
> Regarding DMD, I recall it being said that its code generator always treats the 
> true branch as the "likely" code path taken. So if you have `if (cond) cold; 
> else hot;`, invert the condition for the benefit of DMD.

That's correct.


More information about the Digitalmars-d mailing list