Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Re: Re: Slurping BIG files into Hashes

by jsprat (Curate)
on Jun 19, 2003 at 02:26 UTC ( #267055=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Slurping BIG files into Hashes
in thread Slurping BIG files into Hashes

Try presizing the hash - keys %lookup = 160_000;

If it is hash collisions, this might solve the problem.

dominus has an interesting bit at perl.plover.com called When Hashes Go Wrong.

Update: Meant to ask you to "print scalar %lookup;" after all is done. scalar %hash will give you the number of used buckets / number of allocated buckets. If the number of used buckets is low (like 1/16) all your hash items have been put in the same bucket!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://267055]
help
Chatterbox?
[Discipulus]: nice Perl dreams, folks.. shower->Dumas->bed
[erix]: pere ou fils?
[Lady_Aleena]: Discipulus, good night.
[Discipulus]: pere, le vicomte de bragelonne.. wonderfull
[erix]: I'll keep that in mind (haven't read), buona notte :)
[Discipulus]: oh erix but is the fourth of cycle;read them in order
[erix]: hm, perhaps I can just read it here
Discipulus zzz...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2017-05-23 20:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?