Um..., Happy to be of service (I guess).
I'm not aware of any optimizations that might directly affect threading. At some point, it all boils down to how well code executes on a processor (even in distributed applications), so better optimized code should perform better overall. You might see some drop off with Hyper-Threading, though. As the code becomes tighter with better or more aggressive optimizations, there will tend to be fewer unused processing resources and, hence,less opportunity for the scheduler to execute instructions from a second thread. We've seen this with highly optimized math libraries where adding threads on Hyper-Threading enabled systems yields little if any extra performance.
Still me, but from a different account.
Thank you for your useful answer: I suspect my troubles were caused by a "dirty" recompilation since I didn't notice any glitches afterwards.
Your comments about HT sound reasonable and we've indeed noticed limited gains on simple highly optimised apps.
On the other hand we're quite "lucky" since most of our code is based on Monte Carlo simulations and is not (yet) highly optimised (e.g. we don't use intrinsic functions or other INTEL-specific features) so it's parallel by definition and can easilly profit from OpenMP directives thus remaining portable to other platforms.
-- Marco --