From d86dfdec7c18ceb002889d73f808a4be4ee7105f Mon Sep 17 00:00:00 2001 From: Gorik Date: Mon, 23 Nov 2015 01:21:41 -0500 Subject: [PATCH] Removed unused code in ISO8601Utils --- .../gson/internal/bind/util/ISO8601Utils.java | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/gson/src/main/java/com/google/gson/internal/bind/util/ISO8601Utils.java b/gson/src/main/java/com/google/gson/internal/bind/util/ISO8601Utils.java index e666a056..648f5c2e 100644 --- a/gson/src/main/java/com/google/gson/internal/bind/util/ISO8601Utils.java +++ b/gson/src/main/java/com/google/gson/internal/bind/util/ISO8601Utils.java @@ -345,42 +345,4 @@ public class ISO8601Utils return string.length(); } - public static void main(String[] args) - { - final int REPS = 250000; - while (true) { - long start = System.currentTimeMillis(); - int resp = test1(REPS, 3); - long msecs = System.currentTimeMillis() - start; - System.out.println("Pow ("+resp+") -> "+msecs+" ms"); - - start = System.currentTimeMillis(); - resp = test2(REPS, 3); - msecs = System.currentTimeMillis() - start; - System.out.println("Iter ("+resp+") -> "+msecs+" ms"); - } - } - - static int test1(int reps, int pow) - { - int resp = 3; - while (--reps >= 0) { - resp = (int) Math.pow(10, pow); - } - return resp; - } - - static int test2(int reps, int pow) - { - int resp = 3; - while (--reps >= 0) { - resp = 10; - int p = pow; - - while (--p > 0) { - resp *= 10; - } - } - return resp; - } }