public object Invoke(object[] args) { if (_cached == null) { _cached = InteropCompiler.Create(args[0].As <string>()); } return(_cached); }
public void Simple() { Stopwatch sw = new Stopwatch(); var name = typeof(Test).FullName; var fn = InteropCompiler.Create("Lisp.Compiler.Tests.Test/Add"); var args = new object[] { 1, 2 }; for (int i = 0; i < 1000; i++) { fn.Invoke(args); // Eval(args); } sw.Start(); for (int i = 0; i < 10000000; i++) { fn.Invoke(args); // Eval(args); } Console.WriteLine(sw.ElapsedMilliseconds); }