wyrd Posted January 24, 2003 Posted January 24, 2003 I have a .. well, silly question. :) If you program something in C/C++ and compile that into a .dll for use in your .NET program, will the code run faster then say programming that same thing in .NET and compiling that into .dll? Basically it breaks down to C/C++ .dlls vs. .NET .dlls. Common sense to me would say that the code in the C/C++ .dlls would run faster (not by much, though) and thus make your .NET app run faster. But, I don't know how .NET compiles .dll files in comparison to C/C++ so.. Yeah, I know silly question. Come to think of it, instead of asking I probably should just run some benchmark tests of my own. :eek: But regardless of that I'm searching for possibly more of a technical answer (as to why they run the same speed or one is faster and how .NET compiles .dlls) Quote Gamer extraordinaire. Programmer wannabe.
Moderators Robby Posted January 24, 2003 Moderators Posted January 24, 2003 Without any facts, I would guess the compiled .NET DLL would be faster. Quote Visit...Bassic Software
*Gurus* divil Posted January 24, 2003 *Gurus* Posted January 24, 2003 It depends whether you're writing managed C++ code or unmanaged. With managed you'll get the advantages of the JIT compiler which can give results either slower or faster than natively compiled code, depending on application. If you're writing unmanaged code the only slowdowns could be marshalling to/from it if you're calling it repeatedly. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.