Click here to Skip to main content
13,088,711 members (53,820 online)
Rate this:
Please Sign up or sign in to vote.
See more:
In your experience, are there any performance differences when using CLI/C++ across different versions of the .NET runtimes? Recently we have upgraded an application to .NET 4.0 and we believe the performance of this layer has been negatively effected. Are there some patterns of programming this stack that are less performant than others?
Posted 3-Feb-12 4:35am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I've no (well for practical purposes as near to zero as one can get ;)) experience regarding the language CLI/C++, but I can confirm this happening when we moved from .NET 1.1 to .NET 2.0 six years ago. There were some cached DataTables involved and in .NET 1.1 everything worked like a charm. After the move to .NET 2.0 the relevant code parts using the DataTables seemed to be crawling along at snails pace. The fix was quite easy, albeit not readily found: We switched from DataTables to DataViews and all was swift as before.

That must have been one the greatest WTF situations until then. Since that time there have been numerous occasions where new code broke or negativley affected performance. So from my standpoint it was more a Framwork thing and not the language in itself.

Cheers & have a nice weekend,

Albert Holguin 3-Feb-12 16:51pm
It's the price we pay for using frameworks... +5
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

First you have to verify what security checks are performed. Generally, the performance of STL or STL/CLI is relatively bad in debug version as a lot of validation is done.

That problem also mainly occurs when the application is run under the debugger.

In Release version (and the application running stand-alone), generally the performance is quite adequate.

I have never noticed any decreasing after upgrading to .NET 4.0.

In mixed-mode application (and in debug), .Net container are generally faster than STL one. I think it mainly related to all extra validation that is done to validate iterator and such.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 3 Feb 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100