Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: better array to hash conversion

by ruzam (Curate)
on Dec 11, 2012 at 14:06 UTC ( #1008307=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %hash; @hash{ @array } = 0 .. $#array;
    
  2. or download this
    #!/usr/bin/env perl
    use strict;
    ...
           variation3()
           },
    });
    
  3. or download this
                   Rate variation2 variation3   original variation1
    variation2 142570/s         --       -15%       -35%       -49%
    ...
    original   220185/s        54%        31%         --       -21%
    variation1 279147/s        96%        66%        27%         --
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (18)
As of 2015-07-31 17:41 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 (279 votes), past polls