O
Omid Hodjati
Hi All,
I implemented an encryption algorithm using C#, native C++
and managed C++. Then I measured the CPU time used for
executing this algorithm in all implementation. The
managed version of C++ was the worst ! It is 20 times
slower that the native version and 6 times slower that the
C# versio !!
Because i wanted to use automatic memory management
offered by .Net framework, i used the managaed classes
available. e.g. i have used "Array" class instead of
simple "unsigned char []" constuct. It seems that this
replacement is the main factor in decreasing the execution
performance. (I just don't talk about inability of managed
extentions to support jagged arrys for now...;-).
- Do i have to pay such a big penalty for managed
execution ?
- Does anyone have a better solution for
replacing "unsigned char []" ?(except __gc[] which
ultimatly yiels Array too)
Thanks in advance
I implemented an encryption algorithm using C#, native C++
and managed C++. Then I measured the CPU time used for
executing this algorithm in all implementation. The
managed version of C++ was the worst ! It is 20 times
slower that the native version and 6 times slower that the
C# versio !!
Because i wanted to use automatic memory management
offered by .Net framework, i used the managaed classes
available. e.g. i have used "Array" class instead of
simple "unsigned char []" constuct. It seems that this
replacement is the main factor in decreasing the execution
performance. (I just don't talk about inability of managed
extentions to support jagged arrys for now...;-).
- Do i have to pay such a big penalty for managed
execution ?
- Does anyone have a better solution for
replacing "unsigned char []" ?(except __gc[] which
ultimatly yiels Array too)
Thanks in advance