Interpreter and jit at once ?
Artur Biesiadowski
abies at pg.gda.pl
Thu Apr 23 01:31:59 PDT 1998
Dan McGuirk wrote:
> > I've written small program testing speed of put/get static opcodes for
> > tya and tested it - here are the results (linux).
>
> Could you post the code? I'd be interested in seeing it.
It is really simple test, designed to test speed of opcodes.
Here it is, feel free to do antything you want with it.
(such things should be probably done directly in jasmin, but javac is
simplier - it is sometimes good to have non-optimizing compiler)
Artur
------ cut here ----------
/**
test put/get static opcodes
exactly one of each get/put (8 total) and one integer compare branch
per loop
Compile without -O !!!!
*/
public class TestOpcodeStatic
{
static int sint;
static long slong;
static float sfloat;
static double sdouble;
public static void main( String argv[] )
{
long startTime = System.currentTimeMillis();
for( sint =0; sint < 5000000; sint++ )
{
slong = slong;
sfloat = sfloat;
sdouble = sdouble;
}
System.out.println(System.currentTimeMillis()-startTime);
}
}
More information about the kaffe
mailing list