[svn:parrot] r43716 - trunk/src/pmc

plobsing at svn.parrot.org plobsing at svn.parrot.org
Thu Feb 4 17:06:55 UTC 2010


Author: plobsing
Date: Thu Feb  4 17:06:54 2010
New Revision: 43716
URL: https://trac.parrot.org/parrot/changeset/43716

Log:
use push/pop with imageio todo list instead of shift/unshift.

gives a speadup of ~100 on examples/benchmarks/freeze.pasm (because RPA shift/unshift sucks)

Modified:
   trunk/src/pmc/imageio.pmc

Modified: trunk/src/pmc/imageio.pmc
==============================================================================
--- trunk/src/pmc/imageio.pmc	Thu Feb  4 15:02:52 2010	(r43715)
+++ trunk/src/pmc/imageio.pmc	Thu Feb  4 17:06:54 2010	(r43716)
@@ -161,7 +161,7 @@
                 PMC * const id_list = PARROT_IMAGEIO(info)->id_list;
                 VTABLE_set_pmc_keyed_int(interp, id_list, id, pmc);
                 /* remember nested aggregates depth first */
-                VTABLE_unshift_pmc(interp, todo, pmc);
+                VTABLE_push_pmc(interp, todo, pmc);
             }
         }
         break;
@@ -207,7 +207,7 @@
         VTABLE_push_integer(interp, info,
                 PObj_is_object_TEST(pmc) ? enum_class_Object : pmc->vtable->base_type);
         parrot_hash_put(interp, hash, pmc, (void *)id);
-        VTABLE_unshift_pmc(interp, PARROT_IMAGEIO(info)->todo, pmc);
+        VTABLE_push_pmc(interp, PARROT_IMAGEIO(info)->todo, pmc);
         VTABLE_freeze(interp, pmc, info);
     }
 }
@@ -222,7 +222,7 @@
 
     /* can't cache upper limit, visit may append items */
     while (VTABLE_get_bool(interp, todo)) {
-        current = VTABLE_shift_pmc(interp, todo);
+        current = VTABLE_pop_pmc(interp, todo);
         if (!current)
             Parrot_ex_throw_from_c_args(interp, NULL, 1,
                     "NULL current PMC in visit_loop_todo_list");


More information about the parrot-commits mailing list