Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Faster Hash Slices

by Eily (Curate)
on Nov 28, 2013 at 11:12 UTC ( #1064802=note: print w/ replies, xml ) Need Help??


in reply to Faster Hash Slices

You could win a little time by not copying your data twice : @{$ref}{@head} = split(/\t/); (which will even make split a little faster if you put the result in less elements than there are tab separated values in your string).

Or you could keep the array, and access its elements with constants, like was done here for example (it's done on a blessed arrayref in this case, but it works all the same).


Comment on Re: Faster Hash Slices
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-07-06 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls