Click here to Skip to main content
15,891,762 members
Please Sign up or sign in to vote.
5.00/5 (3 votes)
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

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,

Manfred
 
Share this answer
 
v2
Comments
Albert Holguin 3-Feb-12 16:51pm    
It's the price we pay for using frameworks... +5
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900