On Sun Jan 05 19:35:47 2014, bulk88 wrote: > This patch might need more refinement, specifically I think the number > of asserts is excessive, I used them when I developed the patch and > was > having "Bizarre copy of" problems, but I think they are useless now. > The > function dropped from 0x122 bytes of machine code to 0x10c on my VC > 2003 > 32 bits -O1 build. The TARG usage "bloated" the function a little bit > since sv_2mortal(newSViv()) takes less machine code. It is an > acceptable > tradeoff AFAIK. I'm fairly happy with this patch, but I'm not sure that: + I32 stack_grow = 1; + const I32 avlastindex = AvFILLp(av); /* 0 based */ + I32 avitems; /* 1 based */ + stack_grow += -(gimme_v == G_ARRAY) & avlastindex; /* branch free */ is a speed or maintenance win (it is a space win on x86_64 and presumably x86_32). On 32/64-bit x86 this avoids a branch by using the setCC instruction, but then we later check the exact same condition again. Tony --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=120939