[Mono-bugs] [Bug 80578][Wis] New - Optimize empty array allocation
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jan 22 11:28:39 EST 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by marek.safar at seznam.cz.
http://bugzilla.ximian.com/show_bug.cgi?id=80578
--- shadow/80578 2007-01-22 11:28:39.000000000 -0500
+++ shadow/80578.tmp.15387 2007-01-22 11:28:39.000000000 -0500
@@ -0,0 +1,41 @@
+Bug#: 80578
+Product: Mono: Runtime
+Version: 1.2
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: marek.safar at seznam.cz
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Optimize empty array allocation
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+using System;
+
+public class C
+{
+ public static void Main ()
+ {
+ string[] s;
+ for (int i = 0; i < 1000000; ++i)
+ s = new string[0];
+ }
+}
+
+This program allocates 15625 KB of System.String[] data.
+However, it seems to me that 1 instance should
+be enough in case of 0-sized array.
+
+Please consider this as a suggestion as I don't have
+enough knowledge about runtime to say whether it
+is possible or not.
More information about the mono-bugs
mailing list