JDK-4747361 : Optimize Character for US-ASCII
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-09-13
  • Updated: 2002-10-25
  • Resolved: 2002-10-25
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.2 mantisFixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
Investigation into traces of J2SE startup time has shown that the
single largest consumer of startup time for non-GUI Java applications
is the static initializer for java.lang.Character. This routine
initializes several large tables containing the results for routines
such as isDigit() or isJavaIdentifierStart() for all Unicode
characters. The loops that initialize these tables are long-running.

At least the US-ASCII case should be optimized to avoid the
initialization of these large tables during startup in that locale. A
more general fix may be to split up the tables into ranges so that for
a given locale only a small fraction of the overall table is
initialized in the common case.

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

EVALUATION Memory-mapping most of these tables using New I/O yields roughly a 7% decrease in Hello, World startup time. Unfortunately this approach spends time pulling in the New I/O implementation (not otherwise loaded during core libraries' startup) and requires intrinsification of core sun.misc.Unsafe routines in order to be relatively efficient. Optimizing just the US-ASCII case to avoid initialization of the tables during startup in that locale decreases the startup time for a non-GUI Hello, World application by 18.9%. Implemented in 1.4.2. ###@###.### 2002-09-13 Upon code review from the I18N group and in particular ###@###.###, extended the optimization to cover the Latin-1 range (<= 255). More work will be done in this area for 1.4.2. ###@###.### 2002-10-01
11-06-2004

WORK AROUND
11-06-2004

SUGGESTED FIX
11-06-2004

PUBLIC COMMENTS
10-06-2004