develooper Front page | perl.perl5.porters | Postings from March 2013

Re: use of LIKELY() and UNLIKELY() branch predictors

Thread Previous | Thread Next
From:
Zefram
Date:
March 7, 2013 10:48
Subject:
Re: use of LIKELY() and UNLIKELY() branch predictors
Message ID:
20130307104755.GD984@lake.fysh.org
Nicholas Clark wrote:
>While grovelling on CPAN for uses of LIKELY and UNLIKELY, I found this code
>in bundled code from CityHash:
...
>Which I think is actually a potential bug, isn't it?

Indeed.  The implicit cBOOL() is a visible semantic that needs to
occur for any use of LIKELY/UNLIKELY, even if the expectation part is
unimplemented.  Your patch for the core gets it right.

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About