On Sat May 10 21:57:01 2014, bulk88 wrote: > While looking through the core, I found usage of the EXTEND_MORTAL > macro. It seems to be used as an optimization for later sv_newmortal > or > sv_2mortal calls. The problem is, EXTEND_MORTAL is executed AGAIN in > every sv_newmortal and sv_2mortal through PUSH_EXTEND_MORTAL__SV_C. Most of the EXTEND_MORTAL() calls I see make sense in the case where the code might return a large number of mortals, like in pp_aassign and pp_mapwhile, since it will avoid expensive reallocations of PL_tmps_stack. It's obviously much less useful in some other places: - pp_stat - it always returns 0 or 13 items, and 13 is well below the minimum growth size (128) - pp_gmtime - always extends by 1 or 9. Do any of the other uses strike you as wasteful or incorrect? Tony --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=121845Thread Previous