Boost logo

Boost :

Subject: Re: [boost] [lock-free] CDS -yet another lock-free library
From: Helge Bahmann (hcb_at_[hidden])
Date: 2010-03-30 02:58:39


On Tue, 30 Mar 2010, Khiszinsky, Maxim wrote:

> Steven Watanabe wrote:
>
>>> The problem is that the compiler (in some cases) generates case-based code when 'order' parameter is constant for caller
>
>> Have you actually observed this? On which compilers?
>
> MS Visual C++ 2008, GCC 4.3

I can't second this.

Sure, if you turn optimization off, code looks ridiculous. Both gcc
(tested with various versions ranging from 3.3 to 4.4) and msvc (visual
studio express) optimize the switch/case with constant operand into
nothingness.

Whether templating helps is somewhat besiders the point if the C++0x
interface for atomic operations is specified to use parameters.

I would however be very interested in sparc and ia64 atomic operations,
would you be interested in implementing (or lending me a hand) them for
boost.atomic?

Best regards,
Helge


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk