On Wed, Jan 30, 2013 at 04:21:44PM +0000, Dave Mitchell wrote: > 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 > > http://en.wikipedia.org/wiki/Profile-guided_optimization 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 > workload. I expect there are many macros and if()'s that have an obvious LIKELY/UNLIKELY state for all but the most contrived workloads. Tim.Thread Previous | Thread Next