const #System = javaclass java.lang.System; var t; var max = 1000000; var itr = 3; function count0 { cnt++; } function count2 a { cnt++; } function count3 { var a = 1; cnt++; } function Foo { cnt = 0; } for( var i=0; iResults for JudoScript: bench.judo"); println(" TestTime (ms)"); var total = 0; // simple loop: { t = #System.currentTimeMillis(); var cnt = 0; for( var j=0; jsimple loop: " + t + ""); } // simple fxn call: cnt = 0; t = #System.currentTimeMillis(); for( var j=0; jsimple fxn: " + t + ""); // function call with argument: cnt = 0; t = #System.currentTimeMillis(); for( var j=0; jsimple fxn with arg: " + t + ""); // function call with local: cnt = 0; t = #System.currentTimeMillis(); for( var j=0; jsimple fxn with local: " + t + ""); /* // member dereference: could not get this to work properly { var obj = new Foo(); t = #System.currentTimeMillis(); for( var j=0; jmember dereference: " + t + ""); } */ // string concationation test: { var str = ""; t = #System.currentTimeMillis(); for( var j=0; j<3000; j++ ) str += "0123456789"; t = #System.currentTimeMillis() - t; total += t; println(" string concat: " + t + ""); } /* could not get this to work properly // java class access: { var foo; t = #System.currentTimeMillis(); for( var j=0; jjava class access: " + t + ""); } */ println(" total: " + total + ""); }