I am proposing to try and speed up scheme for 5.7.* - partly to test the concept for perl6. Scheme is as follows: In hv.v always have if (HeKEY(entry) != key && memNE(HeKEY(entry),key,len)) rather than just memNE(). Thus if address of string is same we avoid the string compare. Then invent newSVpvn_share(char *s, STRLEN len, U32 hash) Which creates a Sv_PVIVt with SvPVX being result of sharepvn() and hash stored in the SvUVX. This is aking to what pp_method_named does already, but with the extra twist of using the shared string. These SVs will have SvREADONLY and SvFAKE set and use existing SvLEN == 0 scheme to avoid string being free'd. The READONLY/FAKE does not seem to occur at present but is a bit of a bodge. When that combination occurs with SvPVX sv_clear will unsharepvn() to drop the stringtable refcount. Intial test will only use this for pp_method_named but if it works then the other obvious thing to do is apply it to all constant strings and in particular to the SVs returned from keys %hash - as most hashed have shared keys. Can anyone see a flaw in the basic idea ? -- Nick Ing-SimmonsThread Next