Update performance numbers using production flags.
This commit is contained in:
12
README.html
12
README.html
@@ -120,13 +120,13 @@ in comparison with the standard C distribution.
|
||||
<tr valign="top">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>(interpreted)</td>
|
||||
<td>18.355</td>
|
||||
<td>33.953</td>
|
||||
<td>48.088</td>
|
||||
<td>18.339</td>
|
||||
<td>-n (interpreted)</td>
|
||||
<td>12.838</td>
|
||||
<td>23.290</td>
|
||||
<td>36.894</td>
|
||||
<td>15.163</td>
|
||||
<td></td>
|
||||
<td>java -cp luaj-jse-2.0.jar lua fannkuch.lua 10</td></tr>
|
||||
<td>java -cp luaj-jse-2.0.jar lua -n fannkuch.lua 10</td></tr>
|
||||
<tr valign="top">
|
||||
<td>lua</td>
|
||||
<td>5.1.4</td>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
dest="lib/mochalua-1.0.jar"/>
|
||||
</target>
|
||||
|
||||
<target name="perf-libs" depends="luaj1-lib,luaj2-lib,bcel-lib,jill-lib,kahlua-lib,mochalua-lib"/>
|
||||
<target name="perf-libs" depends="luaj2-lib,bcel-lib,jill-lib,kahlua-lib,mochalua-lib"/>
|
||||
|
||||
<macrodef name="perftest">
|
||||
<attribute name="program" default="lua"/>
|
||||
@@ -52,8 +52,7 @@
|
||||
<echo level="info">=========== @{luaprog} =============</echo>
|
||||
<perftest program="java -version" luaprog="" basedir=""/>
|
||||
<perftest program="lua" luaprog="@{luaprog}"/>
|
||||
<!-- <perftest program="java -cp lib/luaj-j2se-1.0.4.jar lua" luaprog="@{luaprog}"/> -->
|
||||
<perftest program="java -cp luaj-jse-2.0.jar lua" luaprog="@{luaprog}"/>
|
||||
<perftest program="java -cp luaj-jse-2.0.jar lua -n" luaprog="@{luaprog}"/>
|
||||
<perftest program="java -cp luaj-jse-2.0.jar lua -j" luaprog="@{luaprog}"/>
|
||||
<perftest program="java -cp luaj-jse-2.0.jar\\;lib/bcel-5.2.jar lua -b" luaprog="@{luaprog}"/>
|
||||
</sequential>
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.luaj.vm2.LoadState;
|
||||
import org.luaj.vm2.Lua;
|
||||
@@ -70,6 +71,9 @@ public class lua {
|
||||
boolean versioninfo = false;
|
||||
boolean processing = true;
|
||||
boolean nodebug = false;
|
||||
boolean luajc = false;
|
||||
boolean lua2java = false;
|
||||
Vector libs = null;
|
||||
try {
|
||||
// stateful argument processing
|
||||
for ( int i=0; i<args.length; i++ ) {
|
||||
@@ -87,15 +91,16 @@ public class lua {
|
||||
// input script - defer to last stage
|
||||
break;
|
||||
case 'b':
|
||||
LuaJC.install();
|
||||
luajc = true;
|
||||
break;
|
||||
case 'j':
|
||||
Lua2Java.install();
|
||||
lua2java = true;
|
||||
break;
|
||||
case 'l':
|
||||
if ( ++i >= args.length )
|
||||
usageExit();
|
||||
loadLibrary( args[i] );
|
||||
libs = libs!=null? libs: new Vector();
|
||||
libs.addElement( args[i] );
|
||||
break;
|
||||
case 'i':
|
||||
interactive = true;
|
||||
@@ -118,13 +123,17 @@ public class lua {
|
||||
}
|
||||
}
|
||||
|
||||
// new lua state
|
||||
_G = nodebug? JsePlatform.standardGlobals(): JsePlatform.debugGlobals();
|
||||
|
||||
// echo version
|
||||
if ( versioninfo )
|
||||
System.out.println(version);
|
||||
|
||||
// new lua state
|
||||
_G = nodebug? JsePlatform.standardGlobals(): JsePlatform.debugGlobals();
|
||||
if ( luajc ) LuaJC.install();
|
||||
if ( lua2java) Lua2Java.install();
|
||||
for ( int i=0, n=libs!=null? libs.size(): 0; i<n; i++ )
|
||||
loadLibrary( (String) libs.elementAt(i) );
|
||||
|
||||
// input script processing
|
||||
processing = true;
|
||||
for ( int i=0; i<args.length; i++ ) {
|
||||
|
||||
Reference in New Issue
Block a user