You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
multiple evaluation problems in Perl_nextargv #12603
At
http://perl5.git.perl.org/perl.git/blob/b3efb2487fa7bdef70865822dabaa2dc0000dde1:/doio.c#l750
gv_add_by_type is being called twice through the GvSVn macro. That SV *
probably needs to be cached so the computer isn't looking inside the GV
* over and over between each func call. It looks like more things like
that av aren't being cached, but this func looks too complicated for me
to touch and I am not very familiar with GV mechanics.
gv_add_by_type is being called twice through the GvSVn macro.
No, it is not called twice. GvSVn() checks whether the scalar slot is
already filled, and only calls gv_add_by_type() if it's not. After the
first GvSVn() the scalar slot is necessarily filled, so there will be no
further call. The indirection through the glob is being done multiple
times, but that's comparatively cheap, not worth complexifying this code
to avoid. This ticket should be closed.
Activity
p5pRT commentedon Nov 22, 2012
From @bulk88
Created by @bulk88
At
http://perl5.git.perl.org/perl.git/blob/b3efb2487fa7bdef70865822dabaa2dc0000dde1:/doio.c#l750
gv_add_by_type is being called twice through the GvSVn macro. That SV *
probably needs to be cached so the computer isn't looking inside the GV
* over and over between each func call. It looks like more things like
that av aren't being cached, but this func looks too complicated for me
to touch and I am not very familiar with GV mechanics.
Perl Info
p5pRT commentedon Nov 13, 2017
From zefram@fysh.org
No, it is not called twice. GvSVn() checks whether the scalar slot is
already filled, and only calls gv_add_by_type() if it's not. After the
first GvSVn() the scalar slot is necessarily filled, so there will be no
further call. The indirection through the glob is being done multiple
times, but that's comparatively cheap, not worth complexifying this code
to avoid. This ticket should be closed.
-zefram
p5pRT commentedon Nov 13, 2017
The RT System itself - Status changed from 'new' to 'open'
p5pRT commentedon Nov 13, 2017
@cpansprout - Status changed from 'open' to 'rejected'