Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ CLI
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 5:35am
domace190
Rate this: bad
good
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 Wink | ;) ) 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
  Permalink  
v2
Comments
Albert Holguin at 3-Feb-12 16:51pm
   
It's the price we pay for using frameworks... +5
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 195
1 ProgramFOX 130
2 Maciej Los 105
3 Sergey Alexandrovich Kryukov 105
4 Afzaal Ahmad Zeeshan 82
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 3 Feb 2012
Copyright © CodeProject, 1999-2014
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