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

Re: Slowdown in longer hash keys

Thread Previous | Thread Next
From:
demerphq
Date:
August 26, 2012 06:07
Subject:
Re: Slowdown in longer hash keys
Message ID:
CANgJU+XiVSEDsQYkc_YQ42meix7tnYWPVtRucc5eET0eL5Bs=Q@mail.gmail.com
On 26 August 2012 13:11, Aristotle Pagaltzis <pagaltzis@gmx.de> wrote:
> * demerphq <demerphq@gmail.com> [2012-08-25 18:05]:
>> 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.
>
> Another avenue: make the constant-time complexity of hash lookups be
> even more constant: <http://en.wikipedia.org/wiki/Cuckoo_hashing>
>
> (That would also make degenerate-performance cases of the same impact as
> on the current algorithm *at least* drastically harder to construct even
> without randomisation or other unpredictability thrown in.)

Ive been debugging the PERL_HASH function and right now I think we
could speed stuff up by simply calling it less.

Seriously, even a trivial program does gazillions of duplicated
PERL_HASH function calls.

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