QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: dd3QuoteOriginally posted by: DSPGuyNot if you are going for absolute speed.Presumably these boys are going for the last microsecond. I wonder how many people look at the asm code that's being generated? Or for that matter compare highly optimized 'C' to trendy C++ before making pronouncements? My point is for some reason they commingle low latency and STL / Boost,which to me seems ridiculous. Even 'C' that's too abstract gives up a lot.I once found a race condition by accident when looking at the asm code for a really simple loop. The compiler was reloading a value from memory after the comparison was done of a load of the same address. There was no guarantee that the value compared was the same as the reloaded value... lost data! When writing tight code I generally check that the compiler generates something along the lines of what I'd expect. I've seen throughput gains of 10% when one virtual was eliminated.One a related issue: is it possible to discover (potential) race conditions that did not occur when compiled for a 2-core machine (2 threads) but which did actualise when the app was installed on a 4-core machine (4 threads) by looking at asm code?I'm not sure, it would be difficult. The code I was referring to was a small, maybe 6 line loop. I wasn't even looking for problems, just what asm was being generated.Here is the situation:
http://stackoverflow.com/questions/1472 ... cmovTrying to visualise the possible outcomes of multicore program flow will soon drive you demented I think