Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8076287

Performance degradation observed with TimeZone Benchmark

    Details

      Backports

        Description

        Running the following benchmark with 8u40 is about 2-3x slower than running it with 7u76 64 bit:

        package misc.bench;

        import java.util.Date;
        import java.util.TimeZone;

        public class TimeZoneBench {

            private static final int ITERS = 100000;

            private static void bench() {
                Date d = new Date();
                for (int i=0; i < ITERS; i++) {
                    d.toString();
                }
            }
            
            public static void main(String[] args) {
                TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
                System.out.println(TimeZone.getDefault());
                bench(); // warmup
                long start = System.nanoTime();
                bench();
                System.out.println("Time per call : " + (System.nanoTime() - start) / ITERS + " ns");
            }
        }

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  naoto Naoto Sato
                  Reporter:
                  shadowbug Shadow Bug
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: