Subj : Problem with performance of JSCallFunction To : netscape.public.mozilla.jseng From : c_ibrahim Date : Tue Oct 26 2004 01:47 am Hi, I need to execute many similar procedures; the only difference is in the variable value. The first tryout is to use JS_CompileScript once and JS_ExecuteScript many times. It is very fast but I cannot pass parameters so if I wanna use it in the real application, I gotta call JS_CompileScript many times, which I think won't be really efficient. So the next tryout is to call JS_CompileFunction once and call JS_CallFunction many times. Works like a charm but JS_CallFunction is about 25 times slower than JS_ExecuteScript. What I did in the tryout is simply evaluating the expression (2<3) 1000 times for JS_CompileScript-JS_ExecuteScript. JS_CompileFunction compiles a function taking parameters p1 & p2 that returns (p1