Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Speed up hash initialization loop

by Anonymous Monk
on Jan 31, 2013 at 20:56 UTC ( #1016391=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Speed up hash initialization loop
in thread Speed up hash initialization loop

How large will @$vars be? If larger than a hundred elements or so, you will benefit from a Schwartzian transform:

my @sorted_vars = map { $_->[1] } sort { $a->[0] cmp $b->[0] } map { [ lc $_, $_ ] } @{$vars};

I'm afraid I'm as out of ideas as the other posters here -- your only recourse is to use a profiler and find the bottlenecks that way.


Comment on Re^3: Speed up hash initialization loop
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016391]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-11-26 11:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (167 votes), past polls