stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: [PATCH] Use __rw_atomic_xxx() on Windows
Date Thu, 06 Sep 2007 16:31:04 GMT
Farid Zaripov wrote:
>> -----Original Message-----
>> From: Martin Sebor [mailto:sebor@roguewave.com] 
>> Sent: Thursday, September 06, 2007 5:49 AM
>> To: stdcxx-dev@incubator.apache.org
>> Subject: Re: [PATCH] Use __rw_atomic_xxx() on Windows
>>
>> Travis Vitek wrote:
>>> Oh, yeah. that is the other thing that I did Friday. I wrote a 
>>> testcase to compare __rw_atomic_add32() against 
>> InterlockedIncrement() on Win32.
>>> There is a performance penalty...
>> I'd be curious to know if the performance penalty is due to 
>> the function call overhead or something else.
>>
>> In any case though, I think we could tweak the patch and 
>> change the __rw_atomic_pre{de,in}crement() overloads for int 
>> and long to call the appropriate Interlocked{De,In}crement() 
>> intrinsics and have the other overloads use the new ones.
>>
>> Farid, what do you think about this approach?
> 
>   I agree. And I decided to make the changes above
> without making the tests to see the performance penalty.

Okay, that sounds like a good approach to me. You can still
commit the int and long atomic functions, we just won't call
them.

Martin

Mime
View raw message