If you are using Perl, it's because the development time is faster than anything else out there. You are not using it for it's amazing speed improvements or it's parsimonious memory usage.

Hence, I am of the opinion that, barring gross improvements, optimizations on the scalar level are more than useless. They are counter-productive because you're still thinking in the C/C++ mentality of byte optimization. You've failed to appreciate the Perl mentality of development time optimization.

Some gross improvements could include:

  1. Using parallel arrays instead of hashes when dealing with a very large number of objects, each have 2-3 attributes.
  2. Serializing strings instead of n-deep HoH's (where it makes sense).
Things on that nature. Trying to optimize on the scalar level, especially the scalar string level, is, to me, trying to outfox the Perl interpreter. If you can do that, start guts-jumping and make it better for everyone.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.


In reply to Re: Re^2: Measurement of physical memory by dragonchild
in thread Measurement of physical memory by Anonymous Monk

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.