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.
Migrated from rt.perl.org#115860 (status was 'rejected')
Searchable as RT115860$
The text was updated successfully, but these errors were encountered: