develooper Front page | perl.perl5.porters | Postings from August 2012

Re: Slowdown in longer hash keys

Thread Previous | Thread Next
From:
demerphq
Date:
August 25, 2012 09:00
Subject:
Re: Slowdown in longer hash keys
Message ID:
CANgJU+UKX+0MtJ4R6t76GkaeG8ZzCORV0LfewLnxBOysL7ht5Q@mail.gmail.com
On 25 August 2012 17:44, demerphq <demerphq@gmail.com> wrote:
> On 25 August 2012 16:09, Dave Mitchell <davem@iabyn.com> wrote:
>> On Sat, Aug 25, 2012 at 03:09:29PM +0200, demerphq wrote:
>>> Is there a function for calculating the key? I looked and didn't find one.
>>
>> Looks like there's just the (undocumented) PERL_HASH macro.
>
> Yeah I knew about that, but its undocumented so I didn't consider it
> part of the API.
>
> So I guess that means the precomputed key API is restricted for things
> internal to the core, or who are never going to make the hash
> available to Perl.
>
> Is there a reason we can't expose the key function?  Could the
> degenerate-hash logic somehow complicate things? (Added Nicholas as a
> cc, as I think he might have some insight here.)


Actually this reminds me. Sometime back there was a thread on maybe
changing the hash algorithm to something faster or better.

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-05/msg00261.html

Maybe we should revisit that one day.

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