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

RFE: SimpleDateFormat performance improvement

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta2
    • generic
    • generic

      There are a couple of things for improving SimpleDateFormat performance.

      The 4326988 fix requires to scan the given pattern string to verify it. It's possible to compile a pattern string with a little extra of cpu cycles so that further scans (e.g., counting 'y's) of the same pattern in format() and parse().

      SimpleDateFormat.format() invokes DecimalFormat to format numbers, such as a year number, in a locale-dependent way. However, numbers to be formatted are usually in 1, 2 or 4 digits. Some optimization can be done.

            okutsu Masayoshi Okutsu
            okutsu Masayoshi Okutsu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: