Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Bidirectional lookup algorithm? (Solution.)

by BrowserUk (Patriarch)
on Jan 11, 2015 at 18:15 UTC ( [id://1112899]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    typedef struct {
        U64 addr;
    ...
        U32    used;
        double factor;
    } BIMAP;
    
  2. or download this
    C:\test>1112165-hash
    Start: mem: 7,920 K
    ...
    Fetch by Name took 7.539046 seconds
    Fetch by Addr took 8.349479 seconds
    Hash queried: check mem: 4,382,852 K
    
  3. or download this
    C:\test>BiMap -S=5 -F=0.71 -I=12000000 -D=0
    bless(do{\(my $o = 52848976)}, "BiMap")
    
    Fetch by Addr & Fetch by Name took 22.257803 seconds for 11881376 item
    +s in a 16777216 sized BiMap
    Mem: 580,552 K
    
  4. or download this
    C:\test>BiMap -S=5 -F=0.70 -I=20000000 -D=0
    bless(do{\(my $o = 52848976)}, "BiMap")
    
    Fetch by Addr & Fetch by Name took 19.896479 seconds for 11881376 item
    +s in a 33554432 sized BiMap
    Mem: 777,532 K
    
  5. or download this
    #! perl -slw
    package BiMap; use strict; #use Config;
    ...
        print sum( values %counts );
        print $total / $bm->used;
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found