Subj : Performance question: Interpreter vs. CodeGen? To : netscape.public.mozilla.jseng From : tdwang@yahoo.com (Tom) Date : Thu Jan 23 2003 04:17 pm Hi, By doing Context.setOptimizationLevel(-1) will force Rhino to call Interpreter instead of CodeGen when compiling a js function. In our app we have a compiled js function and will call it many times, based on the number of rows returned from database query. So it's a compile-once-run-many-times thing. I wonder if anyone could provide some hints on the performance difference between using Interpreter vs. CodeGen? By looking at the source code there doesn't appear to be big difference, am I correct? We had to switch from CodeGen to Interpreter because we found out that the java classes generated by CodeGen don't get garbage collected by JVM. Thanks in advance! -Tom .