[svn:parrot] r38478 - trunk/src

chromatic at svn.parrot.org chromatic at svn.parrot.org
Tue May 5 03:26:31 UTC 2009


Author: chromatic
Date: Tue May  5 03:26:30 2009
New Revision: 38478
URL: https://trac.parrot.org/parrot/changeset/38478

Log:
[oo] Replaced a method invocation with the equivalent VTABLE invocation when
computing C3 MRO; this makes Rakudo start up around 8.5% faster.  Combined with
previous optimizations, Rakudo starts up over 10% faster now.

Modified:
   trunk/src/oo.c

Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c	Tue May  5 03:15:02 2009	(r38477)
+++ trunk/src/oo.c	Tue May  5 03:26:30 2009	(r38478)
@@ -1100,14 +1100,14 @@
 Parrot_ComputeMRO_C3(PARROT_INTERP, ARGIN(PMC *_class))
 {
     ASSERT_ARGS(Parrot_ComputeMRO_C3)
+
+    PMC *merge_list        = PMCNULL;
+    PMC *immediate_parents = VTABLE_inspect_str(interp, _class, CONST_STRING(interp, "parents"));
     PMC *result;
-    PMC *merge_list = PMCNULL;
-    PMC *immediate_parents;
-    int i, parent_count;
+
+    int  i, parent_count;
 
     /* Now get immediate parents list. */
-    Parrot_PCCINVOKE(interp, _class, CONST_STRING(interp, "parents"),
-        "->P", &immediate_parents);
 
     if (!immediate_parents)
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_METHOD_NOT_FOUND,


More information about the parrot-commits mailing list