[svn:parrot] r45209 - trunk/src/packfile
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Sat Mar 27 21:34:36 UTC 2010
Author: chromatic
Date: Sat Mar 27 21:34:36 2010
New Revision: 45209
URL: https://trac.parrot.org/parrot/changeset/45209
Log:
[PF] Inlined an inlinable memcpy() within fetch_op_le_4(), avoiding yet another
function call (itself non-inlinable) when thawing PBC. This patch speeds up
the Rakudo startup benchmark by 2.771%.
Modified:
trunk/src/packfile/pf_items.c
Modified: trunk/src/packfile/pf_items.c
==============================================================================
--- trunk/src/packfile/pf_items.c Sat Mar 27 20:57:04 2010 (r45208)
+++ trunk/src/packfile/pf_items.c Sat Mar 27 21:34:36 2010 (r45209)
@@ -984,14 +984,16 @@
unsigned char buf[4];
opcode_t o;
} u;
- fetch_buf_le_4(u.buf, b);
#if PARROT_BIGENDIAN
+ fetch_buf_le_4(u.buf, b);
# if OPCODE_T_SIZE == 8
return (Parrot_Int4)(u.o >> 32);
# else
return (opcode_t) fetch_iv_be((INTVAL)u.o);
# endif
#else
+ /* inlining the effects of the fetch_buf_le_4() call is worth it */
+ memcpy(u.buf, b, 4);
# if OPCODE_T_SIZE == 8
/* without the cast we would not get a negative int, the vtable indices */
return (Parrot_Int4)(u.o & 0xffffffff);
More information about the parrot-commits
mailing list