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

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

by marioroy (Prior)
on Aug 05, 2017 at 08:59 UTC ( [id://1196792]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Benchmark: timing 200000 iterations of Big, Mat, Pak, St2, Str...
     Big: 10 wallclock secs ( 6.16 usr + 0.0 sys = 6.16 CPU) @ 32467.53/s 
    +(n=200000)
    ...
     St2:  3 wallclock secs ( 4.09 usr + 0.0 sys = 4.09 CPU) @ 48899.76/s 
    +(n=200000)
     Str:  5 wallclock secs ( 4.97 usr + 0.0 sys = 4.97 CPU) @ 40241.45/s 
    +(n=200000)
    
  2. or download this
    {
       my @points_str;
    ...
       Mat => sub { mat_look($mat_ref) },
    };
    
  3. or download this
    Benchmark: timing 200000 iterations of Big, Mat, Pak, St2, St3, Str...
     Big:  6 wallclock secs ( 6.17 usr + 0.0 sys = 6.17 CPU) @ 32414.91/s 
    +(n=200000)
    ...
     St3:  1 wallclock secs ( 2.11 usr + 0.0 sys = 2.11 CPU) @ 94786.73/s 
    +(n=200000)
     Str:  4 wallclock secs ( 4.90 usr + 0.0 sys = 4.90 CPU) @ 40816.33/s 
    +(n=200000)
    
  4. or download this
    sub st3_look {
       my $cells = shift;
    ...
    Initialization of state variables in list context currently forbidden 
    +at test.pl line 266, near "@points;"
    Execution of test.pl aborted due to compilation errors.
    
  5. or download this
    use feature qw(state);
    
    ...
       exists $cells->{'notfound3'} and die;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-16 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found