File: TestOpcodeStatic.java

package info (click to toggle)
tya 1.6-1
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 628 kB
  • ctags: 843
  • sloc: ansic: 7,028; asm: 618; java: 497; makefile: 88; sh: 18
file content (26 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
 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);
	}
}