Seeing as Graph::Directed is back by hashes, what is a realistic maximum size for the capacity of a hash or an array in Perl given factors such as the hashing function and local memory etc.

What do you mean by a "realistic maximum size"? The time to insert into a hash is fairly independent to the size of a hash, unless you are really unlucky and items hash to the same buckets. Every now and then, a single insert will take more time because the C-level array needs to be expanded and items rearranged, but this amortizes out over previous inserts. However, were you to plot a graph how long it takes to fill an N-element hash, you wouldn't get a fairly straight line, but you'd get a broken line. That's because at one moment, your program will begin to swap. But were swapping begins is highly dependent on your system.

As I insert this large graph into the Graph::Directed module I note what appears to be an exponential slowdown as I insert edges.
I can't combine an exponential slowdown with Jarkko inserting 1.5 million edges. He isn't that old.

Abigail


In reply to Re: The Upper Limit of Perl's Native Data Structures by Abigail-II
in thread The Upper Limit of Perl's Native Data Structures by arunhorne

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.