[svn:parrot] r42001 - trunk/include/parrot

chromatic at svn.parrot.org chromatic at svn.parrot.org
Wed Oct 21 23:21:08 UTC 2009


Author: chromatic
Date: Wed Oct 21 23:21:07 2009
New Revision: 42001
URL: https://trac.parrot.org/parrot/changeset/42001

Log:
[GC] Skipped PMCNULL marking as live in the Parrot_gc_mark_PMC_alive macro for
all calls within the core.  This gives a 1.806% performance improvement in the
fib.pir benchmark.

Modified:
   trunk/include/parrot/gc_api.h

Modified: trunk/include/parrot/gc_api.h
==============================================================================
--- trunk/include/parrot/gc_api.h	Wed Oct 21 23:17:48 2009	(r42000)
+++ trunk/include/parrot/gc_api.h	Wed Oct 21 23:21:07 2009	(r42001)
@@ -466,7 +466,13 @@
 #  define Parrot_gc_mark_STRING_alive(interp, obj) Parrot_gc_mark_STRING_alive_fun((interp), (obj))
 #endif
 
-#define Parrot_gc_mark_PMC_alive(interp, obj) Parrot_gc_mark_PMC_alive_fun((interp), (obj))
+#if defined(PARROT_IN_CORE)
+#  define Parrot_gc_mark_PMC_alive(interp, obj) \
+      do if (!PMC_IS_NULL(obj)) Parrot_gc_mark_PMC_alive_fun((interp), (obj)); \
+      while (0)
+#else
+#  define Parrot_gc_mark_PMC_alive(interp, obj) Parrot_gc_mark_PMC_alive_fun((interp), (obj))
+#endif
 
 #endif /* PARROT_GC_API_H_GUARD */
 


More information about the parrot-commits mailing list