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

Re: Should we consider locked hashes a failed experiment?

Thread Previous | Thread Next
From:
demerphq
Date:
January 29, 2017 19:33
Subject:
Re: Should we consider locked hashes a failed experiment?
Message ID:
CANgJU+UuHC58FC6-B3Nm3uBKBaseFfXYx+FZeUL9=sYXignGVw@mail.gmail.com
On 29 January 2017 at 19:19, Andy Lester <andy@petdance.com> 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.)

yves

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

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