Created
September 23, 2016 16:26
-
-
Save pbloem/ce4f6758f0bb1424c155c26e83ca88a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiled from "Sandbox.java" | |
public class Sandbox { | |
public static final java.util.Random RANDOM; | |
public static double sumWith; | |
public static double sumWithout; | |
public static double t0; | |
static {}; | |
Code: | |
0: new #14 // class java/util/Random | |
3: dup | |
4: invokespecial #16 // Method java/util/Random."<init>":()V | |
7: putstatic #19 // Field RANDOM:Ljava/util/Random; | |
10: dconst_0 | |
11: putstatic #21 // Field sumWith:D | |
14: dconst_0 | |
15: putstatic #23 // Field sumWithout:D | |
18: dconst_0 | |
19: putstatic #25 // Field t0:D | |
22: return | |
public Sandbox(); | |
Code: | |
0: aload_0 | |
1: invokespecial #29 // Method java/lang/Object."<init>":()V | |
4: return | |
public static void main(java.lang.String[]); | |
Code: | |
0: bipush 100 | |
2: istore_1 | |
3: iconst_0 | |
4: istore_2 | |
5: goto 131 | |
8: iload_1 | |
9: newarray int | |
11: astore_3 | |
12: iload_1 | |
13: newarray int | |
15: astore 4 | |
17: iconst_0 | |
18: istore 5 | |
20: goto 64 | |
23: aload_3 | |
24: iload 5 | |
26: getstatic #19 // Field RANDOM:Ljava/util/Random; | |
29: iload_1 | |
30: bipush 100 | |
32: imul | |
33: invokevirtual #34 // Method java/util/Random.nextInt:(I)I | |
36: iastore | |
37: aload 4 | |
39: iload 5 | |
41: getstatic #19 // Field RANDOM:Ljava/util/Random; | |
44: iload_1 | |
45: bipush 100 | |
47: imul | |
48: invokevirtual #34 // Method java/util/Random.nextInt:(I)I | |
51: iastore | |
52: aload_3 | |
53: invokestatic #38 // Method java/util/Arrays.sort:([I)V | |
56: aload 4 | |
58: invokestatic #38 // Method java/util/Arrays.sort:([I)V | |
61: iinc 5, 1 | |
64: iload 5 | |
66: iload_1 | |
67: if_icmplt 23 | |
70: invokestatic #44 // Method java/lang/System.nanoTime:()J | |
73: l2d | |
74: putstatic #25 // Field t0:D | |
77: aload_3 | |
78: aload 4 | |
80: invokestatic #50 // Method with:([I[I)I | |
83: pop | |
84: getstatic #21 // Field sumWith:D | |
87: invokestatic #44 // Method java/lang/System.nanoTime:()J | |
90: l2d | |
91: getstatic #25 // Field t0:D | |
94: dsub | |
95: dadd | |
96: putstatic #21 // Field sumWith:D | |
99: invokestatic #44 // Method java/lang/System.nanoTime:()J | |
102: l2d | |
103: putstatic #25 // Field t0:D | |
106: aload_3 | |
107: aload 4 | |
109: invokestatic #54 // Method without:([I[I)I | |
112: pop | |
113: getstatic #23 // Field sumWithout:D | |
116: invokestatic #44 // Method java/lang/System.nanoTime:()J | |
119: l2d | |
120: getstatic #25 // Field t0:D | |
123: dsub | |
124: dadd | |
125: putstatic #23 // Field sumWithout:D | |
128: iinc 2, 1 | |
131: iload_2 | |
132: sipush 20000 | |
135: if_icmplt 8 | |
138: getstatic #57 // Field java/lang/System.out:Ljava/io/PrintStream; | |
141: new #61 // class java/lang/StringBuilder | |
144: dup | |
145: ldc #63 // String time with: | |
147: invokespecial #65 // Method java/lang/StringBuilder."<init>":(Ljava/lang/String;)V | |
150: getstatic #21 // Field sumWith:D | |
153: invokevirtual #68 // Method java/lang/StringBuilder.append:(D)Ljava/lang/StringBuilder; | |
156: ldc #72 // String ns. | |
158: invokevirtual #74 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
161: invokevirtual #77 // Method java/lang/StringBuilder.toString:()Ljava/lang/String; | |
164: invokevirtual #81 // Method java/io/PrintStream.println:(Ljava/lang/String;)V | |
167: getstatic #57 // Field java/lang/System.out:Ljava/io/PrintStream; | |
170: new #61 // class java/lang/StringBuilder | |
173: dup | |
174: ldc #86 // String time without: | |
176: invokespecial #65 // Method java/lang/StringBuilder."<init>":(Ljava/lang/String;)V | |
179: getstatic #23 // Field sumWithout:D | |
182: invokevirtual #68 // Method java/lang/StringBuilder.append:(D)Ljava/lang/StringBuilder; | |
185: ldc #72 // String ns. | |
187: invokevirtual #74 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
190: invokevirtual #77 // Method java/lang/StringBuilder.toString:()Ljava/lang/String; | |
193: invokevirtual #81 // Method java/io/PrintStream.println:(Ljava/lang/String;)V | |
196: return | |
public static int with(int[], int[]); | |
Code: | |
0: iconst_0 | |
1: istore_2 | |
2: iconst_0 | |
3: istore_3 | |
4: iconst_0 | |
5: istore 4 | |
7: goto 58 | |
10: aload_0 | |
11: iload_2 | |
12: iaload | |
13: aload_1 | |
14: iload_3 | |
15: iaload | |
16: if_icmple 25 | |
19: iinc 3, 1 | |
22: goto 58 | |
25: aload_0 | |
26: iload_2 | |
27: iaload | |
28: aload_1 | |
29: iload_3 | |
30: iaload | |
31: if_icmpge 40 | |
34: iinc 2, 1 | |
37: goto 58 | |
40: aload_0 | |
41: iload_2 | |
42: iaload | |
43: aload_1 | |
44: iload_3 | |
45: iaload | |
46: if_icmpne 58 | |
49: iinc 4, 1 | |
52: iinc 2, 1 | |
55: iinc 3, 1 | |
58: iload_2 | |
59: aload_0 | |
60: arraylength | |
61: if_icmpge 70 | |
64: iload_3 | |
65: aload_1 | |
66: arraylength | |
67: if_icmplt 10 | |
70: iload 4 | |
72: ireturn | |
public static int without(int[], int[]); | |
Code: | |
0: iconst_0 | |
1: istore_2 | |
2: iconst_0 | |
3: istore_3 | |
4: iconst_0 | |
5: istore 4 | |
7: goto 49 | |
10: aload_0 | |
11: iload_2 | |
12: iaload | |
13: aload_1 | |
14: iload_3 | |
15: iaload | |
16: if_icmple 25 | |
19: iinc 3, 1 | |
22: goto 49 | |
25: aload_0 | |
26: iload_2 | |
27: iaload | |
28: aload_1 | |
29: iload_3 | |
30: iaload | |
31: if_icmpge 40 | |
34: iinc 2, 1 | |
37: goto 49 | |
40: iinc 4, 1 | |
43: iinc 2, 1 | |
46: iinc 3, 1 | |
49: iload_2 | |
50: aload_0 | |
51: arraylength | |
52: if_icmpge 61 | |
55: iload_3 | |
56: aload_1 | |
57: arraylength | |
58: if_icmplt 10 | |
61: iload 4 | |
63: ireturn | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment