summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-24 01:09:14 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-24 01:45:32 -0800
commit804b5ed7b6140d5110359c81438a8dea7f5b0e04 (patch)
treec0fec147f59026fa9ee470d8e6e9e50a3303c436 /proto.h
parent5668452f0dfcb2591dfb8da07389b99e8823a280 (diff)
downloadperl-804b5ed7b6140d5110359c81438a8dea7f5b0e04.tar.gz
Make assignment over glob copies much faster
sv_force_normal is passed the SV_COW_DROP_PV flag if the scalar is about to be written over. That flag is not currently used. We can speed up assignment over fake GVs a lot by taking advantage of the flag. Before and after: $ time ./perl -e '$x = *foo, undef $x for 1..2000000' real 0m4.264s user 0m4.248s sys 0m0.007s $ time ./perl -e '$x = *foo, undef $x for 1..2000000' real 0m1.820s user 0m1.812s sys 0m0.005s
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto.h b/proto.h
index 0906acf0ed..3d8f993da5 100644
--- a/proto.h
+++ b/proto.h
@@ -6732,7 +6732,7 @@ STATIC STRLEN S_sv_pos_u2b_midway(const U8 *const start, const U8 *send, STRLEN
#define PERL_ARGS_ASSERT_SV_POS_U2B_MIDWAY \
assert(start); assert(send)
-STATIC void S_sv_unglob(pTHX_ SV *const sv)
+STATIC void S_sv_unglob(pTHX_ SV *const sv, U32 flags)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_SV_UNGLOB \
assert(sv)