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

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

Thread Previous | Thread Next
Dave Mitchell
January 30, 2013 16:22
Re: use of LIKELY() and UNLIKELY() branch predictors
Message ID:
On Tue, Jan 29, 2013 at 01:58:03PM -0500, bulk88 wrote:
> Dave Mitchell wrote:
> >Perl defines the LIKELY() and UNLIKELY() macros, which (under gcc)
> >tell the compiler whether a particular expression is likely to be true or
> >not. This allows you to re-write something like
> Why do it by hand, rather than use
> with a real
> work load (what is a real workload?)?

Well, there's the rub. perl doesn't have a standard "workload" suite. The
test suite is specifically not useful for this sort of thing, since it
likes testing edge cases and exercising all those branches that would
normally not be taken.

And one person's "standard" workload is another person's atypical one.
Realistically, any profiling should be done by the end user on perl
running their own applications to build a perl optimised for their own

You live and learn (although usually you just live).

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About