Porting C# code

Brien reply at tolist.com
Fri Jan 8 06:24:37 PST 2010


BCS Wrote:
> IIRC managed<->un-managed calls are insanely expensive. If you do this,profile 
> the Snot out of it to be sure you actually get a gain out of it.

I can confirm that.  The thunk layer is pretty heavy weight and tends to allocate memory to boot.  Additionally, I've tried using "unsafe" C# and the code gen doesn't seem to deal with that very efficiently.  And lastly, it does really poorly optimizing value type structs so the builtin features that could theoretically  get you closer to the metal don't in reality.




More information about the Digitalmars-d mailing list