No subject


Sun Jul 15 12:35:10 BST 2007


> > I think there are both positives and negatives to your point.  Does this
> > paragraph capture the issue?
> >
> > Presentations, articles, and papers
> > will likely assume or require sequentially-consistent operations,
> > which are often stronger than algorithms require.
> > The consequences are that
> > presented algorithms are more accessible but less efficient.
> 
> No. Besides that "more accessible" should be something like
> "understandable" per above :-), the other minimal change would be
> to change the end to be "...but potentially less efficient on some
> platforms." On many platforms (e.g., x86 and x64) and for many use cases
> (e.g., DCL, ref counting) the performance difference between SC atomics
> and less-than-SC atomics is expected to be zero or unmeasurable. Right?

And for other uses, for example, split counters, the performance
difference can be quite dramatic.

> I personally expect some vendors will be likely to implement the C++0x
> non-SC atomic variants with SC semantics anyway (i.e., make dropping
> below SC a no-op on the platforms they care about, and document/warn that
> using the relaxed features has no effect on this implementation and is
> not recommended unless you're trying to write code that is portable to
> a weaker hardware platform), unless they find a significant performance
> difference for a real use case of course.

Given that some vendors used Green Threads to implement pthreads, I
have no doubt that you are correct when you say that some vendors will
provide SC implementations of the relaxed APIs.  ;-)

							Thanx, Paul



More information about the cpp-threads mailing list