diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-11-24 01:09:14 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-24 01:45:32 -0800 |
commit | 804b5ed7b6140d5110359c81438a8dea7f5b0e04 (patch) | |
tree | c0fec147f59026fa9ee470d8e6e9e50a3303c436 /embed.fnc | |
parent | 5668452f0dfcb2591dfb8da07389b99e8823a280 (diff) | |
download | perl-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 'embed.fnc')
-rw-r--r-- | embed.fnc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1994,7 +1994,7 @@ pR |SV * |varname |NULLOK const GV *const gv|const char gvtype \ pX |void |sv_del_backref |NN SV *const tsv|NN SV *const sv #if defined(PERL_IN_SV_C) nsR |char * |uiv_2buf |NN char *const buf|const IV iv|UV uv|const int is_uv|NN char **const peob -s |void |sv_unglob |NN SV *const sv +s |void |sv_unglob |NN SV *const sv|U32 flags s |void |not_a_number |NN SV *const sv s |I32 |visit |NN SVFUNC_t f|const U32 flags|const U32 mask # ifdef DEBUGGING |