Author: benm
Date: 2005-10-10 17:28:56 -0400 (Mon, 10 Oct 2005)
New Revision: 51532
Modified:
trunk/mcs/class/corlib/System.Globalization/ChangeLog
trunk/mcs/class/corlib/System.Globalization/DateTimeFormatInfo.cs
Log:
2005-10-10 Ben Maurer <[EMAIL PROTECTED]>
* DateTimeFormatInfo.cs: Rather than having a + ' ' + b, have a +
" " + b. This lets us avoid 1) boxing the char and 2) calling
char.ToString. Results in a fairly substantial savings on
DateTime.Parse.
Modified: trunk/mcs/class/corlib/System.Globalization/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Globalization/ChangeLog 2005-10-10
21:02:09 UTC (rev 51531)
+++ trunk/mcs/class/corlib/System.Globalization/ChangeLog 2005-10-10
21:28:56 UTC (rev 51532)
@@ -1,3 +1,10 @@
+2005-10-10 Ben Maurer <[EMAIL PROTECTED]>
+
+ * DateTimeFormatInfo.cs: Rather than having a + ' ' + b, have a +
+ " " + b. This lets us avoid 1) boxing the char and 2) calling
+ char.ToString. Results in a fairly substantial savings on
+ DateTime.Parse.
+
2005-09-21 Atsushi Enomoto <[EMAIL PROTECTED]>
* CompareInfo.cs : switched to "managed collation by default" mode.
Modified: trunk/mcs/class/corlib/System.Globalization/DateTimeFormatInfo.cs
===================================================================
--- trunk/mcs/class/corlib/System.Globalization/DateTimeFormatInfo.cs
2005-10-10 21:02:09 UTC (rev 51531)
+++ trunk/mcs/class/corlib/System.Globalization/DateTimeFormatInfo.cs
2005-10-10 21:28:56 UTC (rev 51532)
@@ -589,12 +589,12 @@
list = PopulateCombinedList
(_ShortDatePatterns, _LongTimePatterns);
if (list != null && list.Length > 0)
return list;
- return new string [] {ShortDatePattern + ' ' +
LongTimePattern};
+ return new string [] {ShortDatePattern + " " +
LongTimePattern};
case 'g':
list = PopulateCombinedList
(_ShortDatePatterns, _ShortTimePatterns);
if (list != null && list.Length > 0)
return list;
- return new string [] {ShortDatePattern + ' ' +
ShortTimePattern};
+ return new string [] {ShortDatePattern + " " +
ShortTimePattern};
// The 'U' pattern strings are always the same as 'F'.
// (only differs in assuming UTC or not.)
case 'U':
@@ -602,12 +602,12 @@
list = PopulateCombinedList (_LongDatePatterns,
_LongTimePatterns);
if (list != null && list.Length > 0)
return list;
- return new string [] {LongDatePattern + ' ' +
LongTimePattern};
+ return new string [] {LongDatePattern + " " +
LongTimePattern};
case 'f':
list = PopulateCombinedList (_LongDatePatterns,
_ShortTimePatterns);
if (list != null && list.Length > 0)
return list;
- return new string [] {LongDatePattern + ' ' +
ShortTimePattern};
+ return new string [] {LongDatePattern + " " +
ShortTimePattern};
// MonthDay
case 'm':
case 'M':
@@ -670,7 +670,7 @@
int i = 0;
foreach (string d in dates)
foreach (string t in times)
- list [i++] = d + ' ' + t;
+ list [i++] = d + " " + t;
return list;
}
return null;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches