Should I port my application to .NET?
March 21, 2007 10:13 PM
Subscribe
Will managed code (.NET) work for me when I'm writing computationally intensive software?
I have this on again, off again project of writing my own ray tracer (a la POV ray: http://www.povray.org/) - just as a fun hobby. I have recently been learning C# and .NET, and am interested in taking advantage of the .NET framework for my GUI, file parser, etc.
My main concern is that porting everything to managed code will result in significantly slower performance for the heavy computational nature of the rendering engine. I'm not concerned about the difficulty in *rewriting* the code (it would be a learning exercise - which is the main point), but I want my code to run as fast as possible, and I'm skeptical that will happen with the overhead involved in managed code.
My question is therefore in 2 parts:
1) am I too skeptical of the CLR's performance? Will my code run just as fast as it does natively? I've seen conflicting reports on the web (some say its just as fast, some say otherwise). Any good side by side comparisons out there involving lots of floating point calculations?
2) if I want to port only my front end GUI, etc to .NET, and keep the back end in native C/C++, what is the best way to go about this? I have read about calling unmanaged DLLs from managed code or using C++/CLI with __nogc tags, etc, but I'm worried that these methods are either too clunky to efficiently pass data back and forth and/or involve a lot of overhead as the processor switches back and forth between managed and unmanaged code
Is there a standard manner of handling this issue? Is there a good paper/tutorial you could point me towards that addresses the questions I'm asking?
Thanks!
posted by jpdoane to computers & internet (8 comments total)
5 users marked this as a favorite
posted by IronLizard at 10:34 PM on March 21, 2007