Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Faster Hash Slices

by Eily (Parson)
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).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1064802]
help
Chatterbox?
[Discipulus]: marto lives above Vallo Adriano, i think
[Discipulus]: Anyway many years passed, we had Perl 3 iirc.. ;=)
[1nickt]: erix looking ... which one?
[1nickt]: Ah hm, the article sction links don;t match the sections. Lowerdown there is info and a map

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-11-21 12:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (299 votes). Check out past polls.

    Notices?