I made some similar tests with the code snippet with a varying size of number of lines and line lengths.

I the worst case (3MB, 1M lines à "x\n") it took well over 10 mins to run through on the local harddisk.

In my perception, the runtime of the code was determined (about linearly) by the number of lines in the data file. (I'd attribute this to the devasting effect of the continuous open/close operations)

Also, working on a network drive (opposed to the local HD), increased the time needed by an order of magnitude. (9923 secs over LAN vs. 723 secs local for my 1M lines data file with a slightly inferior machine than sh1tn's; WinXP)


In reply to Re^2: ?? Blazes under Linux; crawls under XP & Win2K... by pKai
in thread ?? Blazes under Linux; crawls under XP & Win2K... by WordWeaver

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.