[svn:parrot] r45374 - trunk/src

chromatic at svn.parrot.org chromatic at svn.parrot.org
Thu Apr 1 22:12:17 UTC 2010


Author: chromatic
Date: Thu Apr  1 22:12:17 2010
New Revision: 45374
URL: https://trac.parrot.org/parrot/changeset/45374

Log:
[PMC] Removed a COW from key_string(); hopefully it's unnecessary.  This gives
Rakudo a 1.975% performance improvement on the bootstrapping benchmark.  If
anything starts to go weird, this is the one we want to revert.

Modified:
   trunk/src/key.c

Modified: trunk/src/key.c
==============================================================================
--- trunk/src/key.c	Thu Apr  1 13:20:41 2010	(r45373)
+++ trunk/src/key.c	Thu Apr  1 22:12:17 2010	(r45374)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -452,10 +452,7 @@
             INTVAL int_key;
             STRING *s;
             GETATTR_Key_int_key(interp, key, int_key);
-            s = REG_STR(interp, int_key);
-            if (s)
-                s = Parrot_str_new_COW(interp, s);
-            return s;
+            return REG_STR(interp, int_key);
         }
       case KEY_pmc_FLAG | KEY_register_FLAG:
         {


More information about the parrot-commits mailing list