Rewritten from scratch class lookup internals - getting a good performance
authorNicola Pero <nicola@gcc.gnu.org>
Mon, 29 Oct 2001 21:24:48 +0000 (21:24 +0000)
committerNicola Pero <nicola@gcc.gnu.org>
Mon, 29 Oct 2001 21:24:48 +0000 (21:24 +0000)
boost for class method invocations

From-SVN: r46616

libobjc/ChangeLog

index 452c497c0f8588b842a8a180b72a05c80b3a3dd4..6e41008b78ca1e2f816545ba1348a2b7a098f11d 100644 (file)
@@ -1,3 +1,19 @@
+Mon Oct 29 21:29:21 2001  Nicola Pero  <n.pero@mi.flashnet.it>
+
+       * class.c: Rewritten the class table to use optimized, lock-free
+        lookup.  This more than doubles the speed of class method
+        invocations.  (class_table_setup), (class_table_insert),
+        (class_table_replace), (class_table_get_safe),
+        (class_table_next), (class_table_print),
+        (class_table_print_histogram): New functions.
+        (__objc_init_class_tables): Use class_table_setup.
+        (__objc_add_class_to_hash): Use class_table_get_safe and
+        class_table_insert.  (objc_lookup_class), (objc_get_class): Do not
+        assert the existence of the table; do not lock the runtime; use
+        class_table_get_safe.  (objc_next_class): Use class_table_next.
+        (__objc_resolve_class_links): Use class_table_next.
+        (class_pose_as): Use class_table_replace.
+
 2001-09-10  Ovidiu Predescu  <ovidiu@cup.hp.com>
 
        * gc.c: Removed the DEBUG declaration.