Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2015-10-10 13:32 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (257 votes), past polls