Reducing the cost of autodecoding

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 12 16:59:15 PDT 2016


On Wednesday, 12 October 2016 at 23:47:45 UTC, Andrei 
Alexandrescu wrote:
>
> I think we should define two aliases "likely" and "unlikely" 
> with default implementations:
>
> bool likely(bool b) { return b; }
> bool unlikely(bool b) { return b; }
>
> They'd go in druntime. Then implementers can hook them into 
> their intrinsics.
>
> Works?
>
>
> Andrei

I was about to suggest the same.
I can prepare a PR.


More information about the Digitalmars-d mailing list