Hello all,

I heard that latest Symbian nokias use JIT technology, so I compared N7650 vs N6630 with this test, also trying to compare System.arraycopy() performance vs cycle:

Code:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class ArrCopy extends MIDlet {
	Form frm = new Form("Results");
	public ArrCopy() {
	}
	protected void startApp() {
		test();
		Display.getDisplay(this).setCurrent(frm);
	}
	protected void pauseApp() {
	}
	protected void destroyApp(boolean cond) {
	}

	private static final int BLOCK_SIZE = 10*1024;
	private static final int REPEAT_COUNT = 100;

	private static final byte arr1[] = new byte[BLOCK_SIZE];
	private static final byte arr2[] = new byte[BLOCK_SIZE];

	private static final int arrw1[] = new int[BLOCK_SIZE];
	private static final int arrw2[] = new int[BLOCK_SIZE];

	private void test() {
		frm.append("static final arrays:\n");
		long startTime = System.currentTimeMillis();
		for(int i=0; i<REPEAT_COUNT; i++) {
			System.arraycopy(arr1,0,arr2,0,BLOCK_SIZE);
		}
		long endTime = System.currentTimeMillis();
		frm.append("arraycopy of bytes: "+(endTime-startTime)+'\n');

		startTime = System.currentTimeMillis();
		for(int i=0; i<REPEAT_COUNT; i++) {
			for(int j=0; j<arr1.length; j++)
				arr2[j] = arr1[j];
		}
		endTime = System.currentTimeMillis();
		frm.append("cycle of bytes: "+(endTime-startTime)+'\n');

		startTime = System.currentTimeMillis();
		for(int i=0; i<REPEAT_COUNT; i++) {
			System.arraycopy(arrw1,0,arrw2,0,BLOCK_SIZE);
		}
		endTime = System.currentTimeMillis();
		frm.append("arraycopy of ints: "+(endTime-startTime)+'\n');

		startTime = System.currentTimeMillis();
		for(int i=0; i<REPEAT_COUNT; i++) {
			for(int j=0; j<arrw1.length; j++)
				arrw2[j] = arrw1[j];
		}
		endTime = System.currentTimeMillis();
		frm.append("cycle of ints: "+(endTime-startTime)+'\n');

		frm.append("local arrays:\n");
		int arrw1[] = new int[BLOCK_SIZE];
		int arrw2[] = new int[BLOCK_SIZE];

		startTime = System.currentTimeMillis();
		for(int i=0; i<REPEAT_COUNT; i++) {
			System.arraycopy(arrw1,0,arrw2,0,BLOCK_SIZE);
		}
		endTime = System.currentTimeMillis();
		frm.append("arraycopy of ints: "+(endTime-startTime)+'\n');

		startTime = System.currentTimeMillis();
		for(int i=0; i<REPEAT_COUNT; i++) {
			for(int j=0; j<arrw1.length; j++)
				arrw2[j] = arrw1[j];
		}
		endTime = System.currentTimeMillis();
		frm.append("cycle of ints: "+(endTime-startTime)+'\n');
	}
}
The results are:

Nokia 7650 (no JIT):
----
static final arrays:
arraycopy of bytes: 32
cycle of bytes: 1860
arraycopy of ints: 141
cycle of ints: 2656

local arrays:
arraycopy of ints: 156
cycle of ints: 2312

Nokia 6630 (JIT):
----
static final arrays:
arraycopy of bytes: 63
cycle of bytes: 1906
arraycopy of ints: 140
cycle of ints: 1969

local arrays:
arraycopy of ints: 141
cycle of ints: 1531

------

It looks like there's no JIT improvement - either N6630 doesn't use JIT, or N7650 uses it (likely first than second).

Could somebody coomment this?

Thanks,
Mike