Author: miguel
Date: 2007-12-27 16:09:23 -0500 (Thu, 27 Dec 2007)
New Revision: 91964

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/statement.cs
Log:
2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)

        Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
        GHOP:
        
        
http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4
 

        * statement.cs: Changed some Hashtables to use HybridDictionaries
        instead. It was observed that some HashTables only contained a few
        items in the vast majority of cases. Since HybridDictionary is
        more efficient on small sets (<10 elements), "known_variables"
        from class ExplicitBlock as well as "labels" and "constants " from
        class Block were changed to HybridDictionaries. 

        Atsai results: (56216kb->54987kb)

        Miguel results (bootstrap of mcs): 59819kb -> 59290kb




Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2007-12-27 20:56:05 UTC (rev 91963)
+++ trunk/mcs/mcs/ChangeLog     2007-12-27 21:09:23 UTC (rev 91964)
@@ -4,7 +4,26 @@
        GHOP:
        
        
http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4
 
+
+       * statement.cs: Changed some Hashtables to use HybridDictionaries
+       instead. It was observed that some HashTables only contained a few
+       items in the vast majority of cases. Since HybridDictionary is
+       more efficient on small sets (<10 elements), "known_variables"
+       from class ExplicitBlock as well as "labels" and "constants " from
+       class Block were changed to HybridDictionaries. 
+
+       Atsai results: (56216kb->54987kb)
+
+       Miguel results (bootstrap of mcs): 59819kb -> 59290kb
+
+
+2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
+
+       Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
+       GHOP:
        
+       
http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4
 
+       
        * expression.cs: foreach loop to for loop, saved on allocation of
        enumerator (59333kb->59141kb)
 

Modified: trunk/mcs/mcs/statement.cs
===================================================================
--- trunk/mcs/mcs/statement.cs  2007-12-27 20:56:05 UTC (rev 91963)
+++ trunk/mcs/mcs/statement.cs  2007-12-27 21:09:23 UTC (rev 91964)
@@ -1510,7 +1510,7 @@
                //
                // Labels.  (label, block) pairs.
                //
-               Hashtable labels;
+               HybridDictionary labels;
 
                //
                // Keeps track of (name, type) pairs
@@ -1519,7 +1519,7 @@
 
                //
                // Keeps track of constants
-               Hashtable constants;
+               HybridDictionary constants;
 
                //
                // Temporary variables.
@@ -1669,7 +1669,7 @@
                        Toplevel.CheckError158 (name, target.loc);
 
                        if (labels == null)
-                               labels = new Hashtable ();
+                               labels = new HybridDictionary();
 
                        labels.Add (name, target);
                        return true;
@@ -1844,7 +1844,7 @@
                                return false;
                        
                        if (constants == null)
-                               constants = new Hashtable ();
+                               constants = new HybridDictionary();
 
                        constants.Add (name, value);
 
@@ -2350,7 +2350,7 @@
                        this.Explicit = this;
                }
 
-               Hashtable known_variables;
+               HybridDictionary known_variables;
 
                // <summary>
                //   Marks a variable with name @name as being used in this or 
a child block.
@@ -2360,7 +2360,7 @@
                internal void AddKnownVariable (string name, IKnownVariable 
info)
                {
                        if (known_variables == null)
-                               known_variables = new Hashtable ();
+                               known_variables = new HybridDictionary();
 
                        known_variables [name] = info;
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to