develooper Front page | perl.perl5.porters | Postings from December 2000

SvFAKE (was Re: pp_add -> pp_i_add efficiency hack?)

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
December 12, 2000 04:43
Subject:
SvFAKE (was Re: pp_add -> pp_i_add efficiency hack?)
Message ID:
20001212124352.B91652@plum.flirble.org
How come sv_2iv has
	if (SvREADONLY(sv) && SvFAKE(sv)) {
	    sv_force_normal(sv);
	}

but sv_2uv and sv_2nv don't have the same code in the similar position?

[This seems to relate to Change 7016 by "nick" (Nick Ing-Simmons?)
Log: Hash lookup of constant strings optimization:
     Introduce SvREADONLY && SvFAKE to flag an SV which has SvPVX pointing
     to string table (as per sharepvn). Add newSV_pvn_share to create such
     a thing. Make hv.c compare addresses of strings and skip string compare
     if equal. Make method_named and helem ops use these shared-string SVs
     when arg is constant. Make keys op return shared-string SVs (less clearly
     a win).
]

Should such code to force_normal be in sv_2nv and sv_2uv?

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About