Standard way to supply hints to branches
Dom DiSc
dominikus at scherkl.de
Fri Aug 23 07:33:53 UTC 2024
On Friday, 23 August 2024 at 01:47:37 UTC, Manu wrote:
> How can we add an attribute to the branch condition that the
> backend can take advantage of? I think it needs to be in the
> language spec...
I always arrange it so, that the if-path is the likely one, and
the else path is the unlikely one. This also makes the code more
readable, and it is always possible to do so.
The compiler should optimize accordingly. No further indication
should be necessary.
More information about the Digitalmars-d
mailing list