Standard way to supply hints to branches
Iain Buclaw
ibuclaw at gdcproject.org
Fri Aug 23 08:56:19 UTC 2024
On Friday, 23 August 2024 at 02:23:37 UTC, Nicholas Wilson wrote:
>
> GDC probably has something similar too.
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect
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.
More information about the Digitalmars-d
mailing list