Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Fastest way to lookup a point in a set

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

Help for this page

Select Code to Download


  1. or download this
    sub str_look {
       my $cells = shift;
    ...
       exists $cells->{'notfound3'} and die;
    }
    
  2. or download this
    str_look concat 34843.21/s
    str_look join   42643.92/s
    
  3. or download this
    ...
    
    ...
       Mat => sub { mat_look($mat_ref) },
    };
    
  4. or download this
    Benchmark: timing 200000 iterations of Big, Mat, Pak, St2, Str...
     Big: 7 wallclock secs ( 6.73 usr + 0.00 sys = 6.73 CPU) @ 29717.68/s 
    +(n=200000)
    ...
     St2: 3 wallclock secs ( 4.71 usr + 0.00 sys = 4.71 CPU) @ 42462.85/s 
    +(n=200000)
     Str: 6 wallclock secs ( 5.74 usr + 0.00 sys = 5.74 CPU) @ 34843.21/s 
    +(n=200000)
    
  5. or download this
    config_args='-Dprefix=/opt/perl-5.22.3 -sder -Dusethreads -Accflags=-m
    +sse4.2'
    
  6. or download this
    Benchmark: timing 200000 iterations of Big, Mat, Pak, St2, Str...
     Big: 7 wallclock secs ( 6.07 usr + 0.00 sys = 6.07 CPU) @ 32948.93/s 
    +(n=200000)
    ...
     St2: 4 wallclock secs ( 4.67 usr + 0.00 sys = 4.67 CPU) @ 42826.55/s 
    +(n=200000)
     Str: 5 wallclock secs ( 4.88 usr + 0.00 sys = 4.88 CPU) @ 40983.61/s 
    +(n=200000)
    
  7. or download this
    config_args='-Dprefix=/opt/perl-5.24.1 -sder -Dusethreads -Accflags=-m
    +sse4.2'
    
  8. or download this
    Benchmark: timing 200000 iterations of Big, Mat, Pak, St2, Str...
     Big: 6 wallclock secs ( 5.93 usr + 0.00 sys = 5.93 CPU) @ 33726.81/s 
    +(n=200000)
    ...
     St2: 5 wallclock secs ( 4.50 usr + 0.00 sys = 4.50 CPU) @ 44444.44/s 
    +(n=200000)
     Str: 4 wallclock secs ( 4.68 usr + 0.00 sys = 4.68 CPU) @ 42735.04/s 
    +(n=200000)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2024-04-25 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found