Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Speed up hash initialization loop

by Anonymous Monk
on Jan 31, 2013 at 20:56 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-24 17:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found