Re: [MERGE] branch prediction hints

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 13 Oct 2010 22:53:20 +1300

On 13/10/10 04:47, Kinkie wrote:
> Hi all,
> this patch-let makes implements a GCC feature to hint the branch
> prediction algorithms about the likely outcome of a test. This is useful
> to optimize the case of singleton patterns (e.g.
> CacheManager::GetInstance).
> This implements the likely() and unlikely() macros.
>
> Kinkie

I'm neutral on this.

For now definitely hold the cache_manager.cc change until Alex SMP cache
manager updates are in.

I'm also fairly sure it can be done as a base template class to inherit
from. There are a mix of good and crap examples online. Some are fully
thread-safe.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.8
   Beta testers wanted for 3.2.0.2
Received on Wed Oct 13 2010 - 09:53:30 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 13 2010 - 12:00:05 MDT