Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://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

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 browsing the Monastery: (4)
As of 2024-04-19 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found