Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Fastest way to lookup a point in a set

by roboticus (Chancellor)
on Aug 05, 2017 at 16:36 UTC ( [id://1196802]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub dbl_look {
        my $cells = shift;
    ...
        exists $cells->{'notfound2'} and die;
        exists $cells->{'notfound3'} and die;
    }
    
  2. or download this
    timethese 200000, {
       StjA => sub { stj_look($stj_ref, $npoints },
    ...
       StjC => sub { stj_look($stj_ref, 3*$npoints },
       ...
    };
    
  3. or download this
    $ perl pm_1196786.pl
    131, keys 131
    ...
          StrA:  6 wallclock secs ( 6.36 usr +  0.00 sys =  6.36 CPU) @ 31
    +446.54/s (n=200000)
          StrB: 13 wallclock secs (12.67 usr +  0.00 sys = 12.67 CPU) @ 15
    +782.83/s (n=200000)
          StrC: 19 wallclock secs (18.69 usr +  0.00 sys = 18.69 CPU) @ 10
    +702.63/s (n=200000)
    
  4. or download this
    $ cat pm_1196786.pl
    use strict;
    ...
       PakC => sub { pak_look($pak_ref, 3*$npoints) },
       DblC => sub { dbl_look($dbl_ref, 3*$npoints) },
    };
    

Log In?
Username:
Password:

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

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

    No recent polls found