Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < 16; i++)
- {
- {
- long t0 = System.nanoTime();
- regular();
- long t1 = System.nanoTime();
- System.out.println("java " + (t1 - t0) + " nanos");
- }
- {
- long t0 = System.nanoTime();
- Map<String, Object> dump = new HashMap<String, Object>();
- while (withSwitch(dump))
- continue;
- long t1 = System.nanoTime();
- System.out.println("switch " + (t1 - t0) + " nanos");
- }
- System.out.println();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement