Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
my understanding is that space efficiency improvements could come at the expense of (some) speed,

You are correct in that. The ultimate desire is to retain (as much of as is possible) the speed of Perl's hashes; whilst reducing the space requirement necessitated by the need for bidi lookup.

My initial brief suggested that a move from O(1) to O(logN) (with a very small constant) lookup time would be acceptable; if a 4:1 (75%) reduction in space/1:4 (400%) increase in capacity (or greater) was achieved.

However, anonymonk is also correct, in that external storage -- whether disk/SSD or remote ram via sockets -- is too slow. A simple test will show that the minimum turnaround time of sending a request to a 'remote' (even where 'remote' equates to the callback address) and retrieving the reply requires 3 times as long as a perl hash loopkup. Even when you completely exclude the actual lookup and have the request and response consist of a single byte each way.

No matter how fast the actual lookup at the remote, adding that constant to it crushes the overall goal.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

In reply to Re^4: Bidirectional lookup algorithm? (no redis ) by BrowserUk
in thread Bidirectional lookup algorithm? (Updated: further info.) by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.