diff options
author | Tassilo von Parseval <tassilo.parseval@post.rwth-aachen.de> | 2005-10-25 10:11:42 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-10-26 10:21:30 +0000 |
commit | 0a75904b806e52eae8a54feaebd1661bb58649d4 (patch) | |
tree | 72cbb3e9568c69041a5d0b000de3a8ce528e895b | |
parent | 12072db584c2e01bfc16caa132da271f7ae8e5d9 (diff) | |
download | perl-0a75904b806e52eae8a54feaebd1661bb58649d4.tar.gz |
Re: [PATCH] minor speed-up for pp_push()
Message-id: <20051025061141.GA2256@ethan>
p4raw-id: //depot/perl@25854
-rw-r--r-- | pp.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -4333,18 +4333,19 @@ PP(pp_push) call_method("PUSH",G_SCALAR|G_DISCARD); LEAVE; SPAGAIN; + SP = ORIGMARK; + PUSHi( AvFILL(ary) + 1 ); } else { - /* Why no pre-extend of ary here ? */ for (++MARK; MARK <= SP; MARK++) { SV * const sv = NEWSV(51, 0); if (*MARK) sv_setsv(sv, *MARK); - av_push(ary, sv); + av_store(ary, AvFILLp(ary)+1, sv); } + SP = ORIGMARK; + PUSHi( AvFILLp(ary) + 1 ); } - SP = ORIGMARK; - PUSHi( AvFILL(ary) + 1 ); RETURN; } |