Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.63 KB | None | 0 0
  1.          for (int i = 0; i < 16; i++)
  2.          {
  3.             {
  4.                long t0 = System.nanoTime();
  5.                regular();
  6.                long t1 = System.nanoTime();
  7.                System.out.println("java " + (t1 - t0) + " nanos");
  8.             }
  9.  
  10.             {
  11.                long t0 = System.nanoTime();
  12.                Map<String, Object> dump = new HashMap<String, Object>();
  13.                while (withSwitch(dump))
  14.                   continue;
  15.                long t1 = System.nanoTime();
  16.                System.out.println("switch " + (t1 - t0) + " nanos");
  17.             }
  18.  
  19.             System.out.println();
  20.          }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement