Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

First of all, you probably don’t want to process your data as “arrays,” i.e. “memory,” simply because memory is virtual.   The cause of your excessive completion times is undoubtedly caused by virtual-memory thrashing, which is known to “hit the wall” with exponential (not linear...) performance degradation.

I would suggest that you put the data into an SQL database ... or, perhaps, an SQLite database (which is actually a single disk file).   (Remember to use transactions when using SQLite...)   You could now write scripts to extract the elements you’re interested in, dumping these into another table (e.g. with fragment_text and some primary-key element_id field).   Now, the remainder of your task (and of any tasks similar to it) has devolved into an SQL JOIN which doesn’t even require any further programming at all.   (So what if the SQLite file is hundreds of megabytes ... SQLite isn’t bothered by such trivial concerns.)

In reply to Re: Compare 2 very large arrays of long strings as elements by sundialsvc4
in thread Compare 2 very large arrays of long strings as elements by onlyIDleft

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 or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2022-05-28 14:50 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (99 votes). Check out past polls.