Re: Is gcc thread-unsafe?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Phillip Susi
Date: Wednesday, October 31, 2007 - 3:10 pm

>             pushl   %ebp

How is this even an optimization?  It looks SLOWER to me.  The 
conditional read wastes memory bandwidth sometimes, if the condition is 
true, and v isn't already in the cache.  The unconditional write wastes 
memory bandwidth ALL the time, and dirties/flushes caches, in addition 
to not being thread safe.

This SHOULD be using a conditional write instead of a conditional read 
and an unconditional write.


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Is gcc thread-unsafe?, Nick Piggin, (Wed Oct 24, 8:24 pm)
Re: Is gcc thread-unsafe?, Arjan van de Ven, (Wed Oct 24, 8:46 pm)
Re: Is gcc thread-unsafe?, Nick Piggin, (Wed Oct 24, 8:58 pm)
RE: Is gcc thread-unsafe?, David Schwartz, (Wed Oct 24, 9:29 pm)
Re: Is gcc thread-unsafe?, Arjan van de Ven, (Wed Oct 24, 9:35 pm)
Re: Is gcc thread-unsafe?, Nick Piggin, (Wed Oct 24, 9:47 pm)
Re: Is gcc thread-unsafe?, Andi Kleen, (Thu Oct 25, 12:15 am)
Re: Is gcc thread-unsafe?, Samuel Tardieu, (Thu Oct 25, 2:44 am)
Re: Is gcc thread-unsafe?, Andi Kleen, (Thu Oct 25, 2:55 am)
Re: Is gcc thread-unsafe?, linux-os (Dick Johnson), (Thu Oct 25, 4:58 am)
Re: Is gcc thread-unsafe?, Andi Kleen, (Thu Oct 25, 5:16 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Thu Oct 25, 7:55 am)
Re: Is gcc thread-unsafe?, Pekka Enberg, (Thu Oct 25, 8:12 am)
RE: Is gcc thread-unsafe?, David Schwartz, (Thu Oct 25, 2:42 pm)
Re: Is gcc thread-unsafe?, Ismail , (Thu Oct 25, 3:26 pm)
Re: Is gcc thread-unsafe?, Nick Piggin, (Thu Oct 25, 3:49 pm)
Re: Is gcc thread-unsafe?, Jeff Garzik, (Thu Oct 25, 3:56 pm)
Re: Is gcc thread-unsafe?, Jeff Garzik, (Thu Oct 25, 4:04 pm)
Re: Is gcc thread-unsafe?, Andi Kleen, (Thu Oct 25, 4:09 pm)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Thu Oct 25, 4:14 pm)
Re: Is gcc thread-unsafe?, Andi Kleen, (Thu Oct 25, 4:16 pm)
Re: Is gcc thread-unsafe?, Nick Piggin, (Thu Oct 25, 4:22 pm)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Thu Oct 25, 4:32 pm)
Re: Is gcc thread-unsafe?, Andi Kleen, (Thu Oct 25, 4:42 pm)
Re: Is gcc thread-unsafe?, Nick Piggin, (Thu Oct 25, 4:43 pm)
Re: Is gcc thread-unsafe?, Andi Kleen, (Thu Oct 25, 4:55 pm)
Re: Is gcc thread-unsafe?, Nick Piggin, (Thu Oct 25, 4:57 pm)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Thu Oct 25, 4:57 pm)
Re: Is gcc thread-unsafe?, Zachary Amsden, (Thu Oct 25, 6:15 pm)
Re: Is gcc thread-unsafe?, Willy Tarreau, (Thu Oct 25, 9:57 pm)
Re: Is gcc thread-unsafe?, Andrew Haley, (Fri Oct 26, 4:59 am)
Re: Is gcc thread-unsafe?, Andrew Haley, (Fri Oct 26, 4:59 am)
Re: Is gcc thread-unsafe?, Chris Friesen, (Fri Oct 26, 10:39 am)
Re: Is gcc thread-unsafe?, Phillip Susi, (Wed Oct 31, 3:10 pm)