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 08:44
Subject:
Re: Slowdown in longer hash keys
Message ID:
CANgJU+Us7CHhsZKV3ri-=8krqO=0W6=0yd0auqUyVZTDDwUqig@mail.gmail.com
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.)

cheers,
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