Completely agree with you here. This is an edge case. Indeed the job of the script is to extract a subset of the columns from the original data set and reduce amount of data.

Presently the desire to preserve original ordering together with some infrastructural limitations hinder migration to Hadoop-like platforms.

Nonetheless the present version in use already is quite fast in comparison to the version used before (could speed up the python version I got as a legacy to about using about 1/2 of original time and at same time still improve stability.) Ideas of migration to other languages (as Perl, ...) were born out of academic interest (after seeing the improvements possible just in the legacy code) but didn't result in much progress yet. (Finally another step forward came with a multithreaded tcl implementation.)

During the process I at least learned to admire the guys who created the string splitting and joining routines in the various scripting languages. These are enlightening examples of highly optimized code.

P.S.: perl version is embarrassingly short, use of global variables is definitly no issue; I only was amazed to see that the use of lexical variables resulted in a performance penalty.

In reply to Re^2: "my" slowing down programs? by jf1
in thread "my" slowing down programs? by jf1

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.