[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/53171] New: DateFormatSymbols should cache Pattern instan

From: sewe at st dot informatik.tu-darmstadt.de
Subject: [Bug classpath/53171] New: DateFormatSymbols should cache Pattern instances
Date: Mon, 30 Apr 2012 15:57:41 +0000


             Bug #: 53171
           Summary: DateFormatSymbols should cache Pattern instances
    Classification: Unclassified
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: address@hidden
        ReportedBy: address@hidden

Created attachment 27269
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27269
Caching of two Patterns in DateFormatSymbols (to be used by Jikes RVM until
fixed in GNU Classpath)

Currently (in Classpath 0.99), java.text.DateFormatSymbols uses String.split
with two constant patterns ("\u00a9" and "\u00ae") several times whenever a new
DateFormatSymbols instance is created. The corresponding
java.util.regex.Pattern instances should really be cached.

The attached patch improves performance of the DaCapo 2006-10-MR2 luindex
benchmark (which creates many instances of java.text.SimpleDateFormat and
consequently of DateFormatSymbols) on Jikes RVM by about 2%. (See
<http://sourceforge.net/mailarchive/message.php?msg_id=29194083> for further

The serializability of DateFormatSymbols should remain unaffected, as Pattern
is serializable as well.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]