Problem : Use of STL streams in your parallelized code seems to cause your application to run 2x to 5x slower when compared to the original serial version.
Environment : This isssue is likely to be specific to streams implementation in certain versions of Microsoft Visual Studio (Ex: Microsoft Visual Studio 2005).
Root Cause : Streams implementation with this issue use an expensive form of synchronization (Critical Section) which causes high contention and effectively slowsdown the parallel version of your application.
Resolution : Use versions of Streams implementation with a fix for this issue - when they become available. As of Oct 05 2009, there are no known versions with the fix.
Additional Resources:
Can STL Streams Run Concurrently: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/b049dbda-c115-410b-b5d8-513f727baf4d
Tip: Watch out! Use of some versions of STL streams may result in slowdown of your just parallelized application.
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
