summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorVincent Pit <perl@profvince.com>2009-08-27 11:13:09 +0200
committerVincent Pit <perl@profvince.com>2009-08-27 12:54:36 +0200
commit16fa5c119c4bda5c0396a5f81296bd1ccc128a9c (patch)
treeae140159521df8110da72f27f01bb505664cb83c /embed.h
parent04c9e624265a2bf3bdeecd0310e754b5ecc8bbeb (diff)
downloadperl-16fa5c119c4bda5c0396a5f81296bd1ccc128a9c.tar.gz
Speed up repeatcpy() by at least 40% for 1-char or numerous repeats
And don't make it receive the interpreter anymore. For 1-char repeats, use memset(). Otherwise, use the old implementation up to some (small) length, and then use memcpy() in a binary manner, based on what we previously copied. Note that we use memcpy() so both strings shouldn't overlap. The previous implementation didn't allow this as well. This would be a good place to use the restrict keyword from C99. I'm not sure if Configure has a probe for it.
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/embed.h b/embed.h
index 921c63da2c..fa2561fe0f 100644
--- a/embed.h
+++ b/embed.h
@@ -3076,7 +3076,7 @@
#if defined(PERL_CORE) || defined(PERL_EXT)
#define regprop(a,b,c) Perl_regprop(aTHX_ a,b,c)
#endif
-#define repeatcpy(a,b,c,d) Perl_repeatcpy(aTHX_ a,b,c,d)
+#define repeatcpy Perl_repeatcpy
#define rninstr Perl_rninstr
#define rsignal(a,b) Perl_rsignal(aTHX_ a,b)
#ifdef PERL_CORE