[cpp-threads] Memory model counterproposal: synchronizedoperations

Peter Dimov pdimov at mmltd.net
Fri May 27 16:13:07 BST 2005


Nelson, Clark wrote:
>> I don't have any voting power, of course, but if I did, I'd
>> vote against the restriction.
>
> OK, that's fine. But for what kind of restriction would you vote?
>
> Or perhaps there's a more basic question: do you think that, without
> some sort of explicit restriction in the standard, there will still be
> room for optimization? My problem is, I don't think so.

Yes, I believe that there will stil be room for optimization even if all 
variables are potentially visible to all threads. Today the case is that all 
variables are potentially visible to all functions, but the compilers can 
and do prove that some optimizations are safe.

It might be that you have a specific situation in mind that I didn't 
consider, of course. 





More information about the cpp-threads mailing list