content: package com.alibaba.fastjson2.benchmark.primitves;
  
  import static com.alibaba.fastjson2.benchmark.JMH.BH;
  
  public class Date20Test {
      static final Date20 benchmark = new Date20();
  
      public static void fastjson2() {
          for (int j = 0; j < 10; j++) {
              long start = System.currentTimeMillis();
              for (int i = 0; i < 1000 * 1000; ++i) {
                  benchmark.fastjson2(BH);
              }
              long millis = System.currentTimeMillis() - start;
              System.out.println("Date20-fastjson2 : " + millis);
  
              // zulu8.62.0.19 : 1182 1178 1160 779 761 752
              // zulu11.52.13 :
              // zulu17.32.13 :
              // zulu18.28.13 :
              // zulu19.0.47 :
              // corretto-8 :
              // corretto-11 :
              // corretto-17 :
              // corretto-18 :
              // oracle-jdk-17.0.4 :
              // oracle-jdk-18.0.2 :
          }
      }
  
      public static void fastjson2_jsonb() {
          for (int j = 0; j < 10; j++) {
              long start = System.currentTimeMillis();
              for (int i = 0; i < 1000 * 1000; ++i) {
                  benchmark.fastjson2_jsonb(BH);
              }
              long millis = System.currentTimeMillis() - start;
              System.out.println("Date20-fastjson2 : " + millis);
  
              // zulu8.62.0.19 : 249
              // zulu11.52.13 :
              // zulu17.32.13 :
              // zulu18.28.13 :
              // zulu19.0.47 :
              // corretto-8 :
              // corretto-11 : 207
              // corretto-17 :
              // corretto-18 :
              // oracle-jdk-17.0.4 :
              // oracle-jdk-18.0.2 :
          }
      }
  
      public static void fastjson1_perf_test() throws Exception {
          for (int i = 0; i < 10; i++) {
              fastjson1_perf();
          }
      }
  
      public static void fastjson2_millis_perf() {
          long start = System.currentTimeMillis();
          for (int i = 0; i < 1000 * 1000; ++i) {
              benchmark.fastjson2_millis(BH);
          }
          long millis = System.currentTimeMillis() - start;
          System.out.println("Date20-fastjson2_millis : " + millis);
  
          // zulu8.62.0.19 : 610
          // zulu11.52.13 :
          // zulu17.32.13 :
          // zulu18.28.13 :
          // zulu19.0.47 :
          // corretto-8 :
          // corretto-11 :
          // corretto-17 :
          // corretto-18 :
          // oracle-jdk-17.0.4 :
          // oracle-jdk-18.0.2 :
      }
  
      public static void fastjson2_millis_perf_test() throws Exception {
          for (int i = 0; i < 10; i++) {
              fastjson2_millis_perf();
          }
      }
  
      public static void fastjson1_perf() throws Exception {
          long start = System.currentTimeMillis();
          for (int i = 0; i < 1000 * 1000; ++i) {
              benchmark.fastjson1(BH);
          }
          long millis = System.currentTimeMillis() - start;
          System.out.println("Date20-fastjson1 : " + millis);
          // zulu8.62.0.19 : 5874
          // zulu11.52.13 :
          // zulu17.32.13 :
          // zulu18.28.13 :
          // zulu19.0.47 :
          // corretto-8 :
          // corretto-11 :
          // corretto-17 :
          // corretto-18 :
          // oracle-jdk-17.0.4 :
          // oracle-jdk-18.0.2 :
      }
  
      public static void wastjson() throws Exception {
          for (int j = 0; j < 10; j++) {
              long start = System.currentTimeMillis();
              for (int i = 0; i < 1000 * 1000; ++i) {
                  benchmark.wastjson(BH);
              }
              long millis = System.currentTimeMillis() - start;
              System.out.println("Date20-wastjson : " + millis);
              // zulu8.62.0.19 : 780 706
              // zulu11.52.13 :
              // zulu17.32.13 :
              // zulu18.28.13 :
              // zulu19.0.47 :
              // corretto-8 :
              // corretto-11 :
              // corretto-17 :
              // corretto-18 :
              // oracle-jdk-17.0.4 :
              // oracle-jdk-18.0.2 :
          }
      }
  
      public static void main(String[] args) throws Exception {
          fastjson2();
  //        fastjson2_jsonb();
  //        fastjson2_millis_perf_test();
  //        fastjson1_perf_test();
  //        wastjson();
      }
  }
  