public static void main(String[] args) {
		long t = new Date().getTime();
		System.out.println("start");
		TestBuffer b = new TestBuffer(SIZE);
		for(int j = 0;j<LOOPS;j++) {
			for(int i=0;i<SIZE;i++) {
				b.put(i, i);
			}
			for(int i=0;i<SIZE;i++) {
				if (b.get(i) != i) {
					System.out.println("expected "+i+" but got "+b.get(i));
				}
			}
		}
		
		System.out.println("done");
		System.out.println("time = "+(new Date().getTime() - t));
		t = new Date().getTime();
		int[] d = new int[SIZE];

		for(int j = 0;j<LOOPS;j++) {
			for(int i=0;i<SIZE;i++) {
				d[i] = i;
			}
			for(int i=0;i<SIZE;i++) {
				if (d[i] != i) {
					System.out.println("expected "+i+" but got "+d[i]);
				}
			}
		}
		System.out.println("done 2");
		System.out.println("time = "+(new Date().getTime() - t));
		t = new Date().getTime();
		
		ByteBuffer bb = ByteBuffer.allocate(SIZE*4);

		for(int j = 0;j<LOOPS;j++) {
			for(int i=0;i<SIZE;i++) {
				bb.putInt(i<<2, i);
			}
			for(int i=0;i<SIZE;i++) {
				if (bb.getInt(i<<2) != i) {
					System.out.println("expected "+i+" but got "+bb.get(i*4));
				}
			}
		}
		System.out.println("done 3");
		System.out.println("time = "+(new Date().getTime() - t));
		
	}
To change this generated comment edit the template variable "typecomment":
Window>Preferences>Java>Templates.
To enable and disable the creation of type comments go to
Window>Preferences>Java>Code Generation.
Ghidra/Features/Base/src/test/java/ghidra/util/TestBuffer.java