[cpp-threads] RE: volatile, memory models, threads
Boehm, Hans
hans.boehm at hp.com
Sat Mar 4 00:28:30 GMT 2006
If you are filling in a data member of a dynamically allocated class on
demand, e.g. because it only needs to be computed for a small subset of
the instances, but needs to be repeatedly accessed for those. (The
traditional implementation of Java locking in embedded VMs, with a
pointer in every object, which points to a lock structure only if you
try to lock the object, is probably a good example.)
On X86, DCL incurs significant overhead only on the initializing access,
even with Java volatiles. I don't know how else to do that.
Hans
> -----Original Message-----
> From: cpp-threads-bounces at decadentplace.org.uk
> [mailto:cpp-threads-bounces at decadentplace.org.uk] On Behalf
> Of Peter Dimov
> Sent: Friday, March 03, 2006 4:01 PM
> To: C++ threads standardisation
> Subject: Re: [cpp-threads] RE: volatile, memory models, threads
>
> Boehm, Hans wrote:
> >> -----Original Message-----
> >> From: Peter Dimov
> >> My opinion on encouraging DCL aside...
> >
> > I think the Java 5 version is demonstrably a large
> performance win in
> > some cases, especially on X86. There's often no better alternative,
>
> Can you please provide an example where there is no better
> alternative?
>
> --
> cpp-threads mailing list
> cpp-threads at decadentplace.org.uk
> http://www.decadentplace.org.uk/cgi-bin/mailman/listinfo/cpp-threads
>
More information about the cpp-threads
mailing list