View Single Post
Old 19th August 2016, 09:50   #32  |  Link
junh1024
Registered User
 
Join Date: Mar 2011
Posts: 59
Quote:
Originally Posted by MysteryX View Post
Here's something else interesting I found. It is possible to embed a C++ DLL within a C# DLL. This would allow the simplicity of C# while also being able to use C++ assembly without requiring a separate DLL. The best of both worlds!

http://stackoverflow.com/questions/6...ed-c-sharp-dll
https://github.com/Fody/Costura

So in practice, one can do it in C#, and if later he wants to add assembly optimization, it can also be done.
It's not really 'write in C# then optimize it later' like cython or w/e, it's

CLR needs to extract the embedded native DLL somewhere (Windows needs to have a file for the DLL to load it - it cannot load an image from raw memory)

(via http://stackoverflow.com/questions/6...ed-c-sharp-dll )

So even if you want to do DLLception and save 1 DLL, you'll need to extract the C++ part when you use it, leaving you with 2 DLLs, which is no saving at all.
junh1024 is offline   Reply With Quote