JDK-4486735 : RFE: SimpleDateFormat performance improvement
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2001-08-01
  • Updated: 2001-08-08
  • Resolved: 2001-08-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 beta2Fixed
Related Reports
Relates :  
Description
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.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta2 FIXED IN: merlin-beta2 INTEGRATED IN: merlin-beta2
14-06-2004

EVALUATION Prototyping showed ~5% performance improvement in format() and ~10% in parse() with a compiled pattern. More than 40% improvement in format() using optimized number formatting (with the compiled pattern together). Date.toString() showed the same improvement, of course. masayoshi.okutsu@Eng 2001-08-01
01-08-2001