New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EXTEND_MORTAL usage is questionable #13820
Comments
From @bulk88Created by @bulk88While looking through the core, I found usage of the EXTEND_MORTAL ----------------------------------------------------------------- later on in that commit ----------------------------------------------------------------- http://perl5.git.perl.org/perl.git/commitdiff/cc5e57d2fd9821a8c93d8121736585ce8a41aa94 Something isn't fully thought out here. Either we need sv_newmortalnx _________________________________________________ or Something needs to be cleaned up, I'm not sure what. Some interesting changes below -------------------------------------------------------------- The 512 vs 128 thing came from ---------------------------------------------------------------- 128 number came from perl 5.0 alpha 6/~day 1 of 5.0 Perl Info
|
From @tonycozOn Sat May 10 21:57:01 2014, bulk88 wrote:
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 |
The RT System itself - Status changed from 'new' to 'open' |
From @bulk88On Tue Oct 07 20:49:00 2014, tonyc wrote:
Yes for the mortal extend by a constant under 128 yes if you are using sv_2mortal. I think that if you will use EXTEND_MORTAL, a sv_2mortalnx should be later used. sv_2mortalnx should probably also be NN depending on what happens with an assert(sv)/make test. I also dont like the prototype of Perl_tmps_grow. It has a void return type, the following psuedo code is the current C/machine code int ix = my_perl->Itmps_ix; 28094FAF and dword ptr [edi], 0 ;edi is sv, this is writing to sv_any member the code should probably be like this in asm/psuedo C int ix = my_perl->Itmps_ix; Another choice is so Perl_tmps_grow takes ix as its 2nd param, not the 1 or 9 or 20 or whatever count it takes right now. This is for sv_2mortal style usage int ix = my_perl->Itmps_ix; over extend would be like int ix = my_perl->Itmps_ix; -- |
From @bulk88Blead on arm is worse in instruction count due to 2nd PL_temps_ix read
-- |
I don't see anything actionable here and propose closing it. |
Migrated from rt.perl.org#121845 (status was 'open')
Searchable as RT121845$
The text was updated successfully, but these errors were encountered: