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
-faster method lookups, faster new SVPV creation (COWs), some of these
locations were missed by the original branch/PRs/commits that added
SV_CONST() macro/api.
-I belive all "" C string literals that match a SV_CONST_UPPERCASE SV* HEK*
cached constant have been replaced with their SV* POK HEK* COW buffer
equivalents inside libperl with this commit, excluding some instances of
"__ANON__" strings. Only PERL_CORE files qualify for the SV_CONST()
optimization, because of design choices made previously about the
SV_CONST() API. Changing the PERL_CORE-only design choice is out of
scope of this patch.
-in pp_dbmopen() add SV_CONST(TIEHASH) macros for faster lookup/U32 hash
pre-calc, and change newSVpvs_flags("AnyDBM_File", SVs_TEMP) to
newSVpvs_share("AnyDBM_File"), because this sv is used multiple times
in this pp_*() function, and it is a package name, and it is guaranteed
to get passed into hv_common() somewhere eventually in some child
function call we are making.
-some "__ANON__" locations were not changed from sv_*newSV*pvs("__ANON__");
to sv_*newSV*hek(SV_CONST(__ANON__)); because right after, there is a
sv_catpvs(""); that will make the SVPV HEK* COW instantly de-COW which
saved no CPU or memory resources in the end, and only wasted them. Or it
didn't look "safe" for a SV* COW buffer to be on that line.
-pp_tie() call_method() is an thin inefficient wrapper that makes a
mortal SVPV around a C string, since the real backend API is call_sv(),
so switch the call_method() in pp_tie() to the read backend function
call_sv() and avoid making that mortal SVPV
0 commit comments