On Thu, Feb 15, 2007 at 04:06:42PM +0200, Shachar Shemesh wrote: > > BTW, certain operations (atomic operations/counters/etc) -require- asm > > code. > > > In an age where GCC, probably the least optimizing compiler among all > popular compilers, is able to unroll loops and submit them, in parallel, > to a vector processor (such as the MMX and its successors), I highly > doubt that the above statement is true. > > I will also point out that some "atomic operations" are, actually, old > legacy from the 8080 and 8086 days, and actually perform *slower* than > their multi-instruction counter parts (the command "loop" is one example > that comes to mind).
Um, he was talking about operations like test-and-set or fetch-and-add. Even on architectures where they can be implemented purely in C, such implementations come at the cost of both performance and robustness. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]