I have just ported the code to VS2008 from 2003 + Intel Compiler.
Unfortunately, the code runs very slowly! Roughly 2008 = 28 secs; 2008 +
Intel = 25secs ; 2003 = 14 secs ; VS2003 + Intel = 12 seconds.
Another piece of code using the same base library has slowed down by factors
of 100s but I have not looked in detail at it so there might be simpler
explanations.
Not completely clear where the bottlenecks are so it would be good to have
hints. Looks as if it migth be in the STL.
Terry
Have you checked(!) the information on Checked Iterators, meaning some
debugging is enabled by default even in release builds?
http://msdn.microsoft.com/en-us/library/aa985965.aspx
Bo Persson
Thanks - these changes and compiler switches have made the difference.
>Hi, can anyone help. I have some very intensive code (C++) which pushed huge
>numbers of small std::map classes around, iterates across them etc. making
>and deleting them on the way.
Then consider using a vector with reserve (possibly sorted). The
overhead of insertion/deletion with a map is considerable, more so
than what vector provides
Stephen
> Bo Persson
There's a bug in the conversion wizard when you upgrade from older
versions that might have bitten you:
Converting C++ Project From 2005 to 2008 Invisibly Disables Optimization
For Release Build | Microsoft Connect:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=383764&wa=wsignin1.0
2. Make sure that you're examining release performance, not debug
performance (sounds obvious, but people make this mistake far too often).
3. Try defining _SECURE_SCL to 0 project-wide (the easiest way to do this is
to compile all of your objects AND STATIC LIBRARIES with /D_SECURE_SCL=0 ).
VS 2005 and VS 2008 added _SECURE_SCL, which is enabled by default. It
provides a last line of defense against attackers trying to exploit buggy
STL-using programs, at the cost of performance.
Stephan T. Lavavej
Visual C++ Libraries Developer
"terry" <ne...@lyonstech.net> wrote in message
news:ZfOdnSKQjOqmRdrX...@eclipse.net.uk...