[cpp-threads] Yet another visibility question

Paul E. McKenney paulmck at linux.vnet.ibm.com
Sat Jan 13 19:24:53 GMT 2007


On Sat, Jan 13, 2007 at 02:22:38PM +0100, Alexander Terekhov wrote:
> On 1/13/07, Paul E. McKenney <paulmck at linux.vnet.ibm.com> wrote:
> 
> [... SC for atomic<> on x86/IA32 ...]
> 
> >incur a multiple-order-of-magnitude performance penalty for situations
> 
> Yup, I've been telling all along that SC for atomic<> on x86/IA32 is
> very expensive.

Do we all agree that the only reason for using something like atomic<>
is to -increase- performance?

After all, if one does not care about performance, simply stay in a
single-threaded environment and be happy!!!

Unlike Java, one -does- have the option in C/C++ to run a program
entirely single-threaded.  (And yes, I -did- find out about Java's
compulsory multithreading in standard class libraries the hard way.
Why do you ask?)  So, unlike the situation with Java, I don't see
a need for low-performance low-level parallel operations.

So, what am I missing here?

						Thanx, Paul



More information about the cpp-threads mailing list