Click to See Complete Forum and Search --> : How to store a method in memory


macillo
October 7th, 2008, 03:44 AM
Hi guys, I am developping a new application (written in C#) for Windows Embedded CE 6.0
I've a big question for you: I want to maintain some public and compiled methods in memory and then call them whenever I need.
I think that with a "already compiled" method stored in memory, I can boost the performance of my application.
Is it possibile? I know it is a "strange" request and maybe It is not feasible but I want to try anyway.

thanks in advance for all your advices

mmetzger
October 7th, 2008, 07:12 AM
I really don't think what you're after is going to work - remember that .NET basically JIT's any needed code before running anyway. The only delays should be during startup and possibly if you're using more memory than it has space for.

boudino
October 8th, 2008, 02:20 AM
There is native code generator (ngen.exe), which converts IL to native code and should speed up startup of the application, but I don't know if it is available for compact framework too.