Need seperate function for Compilation of script

Oct 8, 2013 at 10:58 AM
My requirement :
Is there a way to compile the script at start and execute the compiled script object multiple times , So as to achive performance optimization.
for ex. seperate compile function and a Run function overload which takes a parameter for pre-compiled script object
Oct 15, 2013 at 10:19 PM
Sure - you can use JintEngine.Compile to get a 'Jint.Expression.Program' object then construct your own ExecutionVisitor and run it as many times as you like.
Note though that Compile really only just parses and lexes, it doesn't perform any sort of op-code generation - Jint is an interpreter after all.