Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Benchmark: Constant List in Hash Sliceby dave_the_m (Monsignor) |
on Mar 13, 2019 at 14:10 UTC ( [id://1231226]=note: print w/replies, xml ) | Need Help?? |
Literal keys in hash subscripts and hash slices have the the hash (as in checksum) values of their strings pre-computed, and the string part of the string constant is stored in such a way that its easy and quick to pass directly to the hash lookup API functions.
Technically: at compile time, the PV part of the const SV is converted to a HEK, with SvPV(sv) pointing to the string part within the HEK. So it looks like a string but is also a HEK. Dave.
In Section
Seekers of Perl Wisdom
|
|