develooper Front page | perl.perl5.porters | Postings from January 2017

Re: Should we consider locked hashes a failed experiment?

Thread Previous | Thread Next
January 29, 2017 19:33
Re: Should we consider locked hashes a failed experiment?
Message ID:
On 29 January 2017 at 19:19, Andy Lester <> wrote:
>> What do people think? Should every hash access and store pay a penalty
>> for locked hashes
> How much of a penalty is it?

We have a check per fetch and something like two or three per store,
depending on exactly how it is used. We also have things like
"clear_placeholders" which are called at various points (I dont
remember exactly when).

The point is the conceptual complexity involved, and how it would
impact our ability to switch to better implementations for our
associative arrays.

You can get an idea by doing a case insensitive search for
"placeholder", which will over match, but will expose a lot of the
code related to locked hashes. (152 lines of match, without any
related context.)


perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About