EasyKev wrote:[color=blue]
> We have been trying to upgrade all our C++ projects from VC6 to VS
> .Net2003 for a while (before VS 2005 arrived), and seem to be stuck
> now because of the performance degradation seen for the same code
> when compiled by the new compiler compared to being compiled by VC 6
> compiler.
> Originally we thought it was the STL libraries that had killed all
> performance but it seems to be a general memory allocation problem in
> VS .Net 2003 (and also in VS 2005). Not only is the performance very
> poor in comparison but seems to be inconsistent for timings too. When
> running the code listed below on VS 6 both sets of timings are about
> the same, when running on VS .Net (2003 and 2005) the timings are
> very much slower than before but also inconsistent, then second set
> of output results are between one and half to twice as slow as the
> first set. Please can someone explain why this would be?
>
> Below is the code snippet, which can be compilied under any of the dev
> environments using any of the projects options you feel like, and
> either debug or release, as long as you compare lilke with like you
> will same the results as below).
> The results shown here are comparing vc7.1 and vc6 release builds
> statically linked with multi-threaded libraries:[/color]
Others have reported similar differences and have found that changing the
small block heap threshold solved the performance difference. See
http://msdn2.microsoft.com/en-us/library/a6x53890.aspx
while this link doesn't say, I believe that the defaults changed between VC6
and VC7 and that that's the source of most allocation-related performance
differences when porting from VC6.
-cd