I get it. You hate my example. I get it. My example was probably poorly chosen. I get it.

But you seem set on refusing to accept that the example was not the point of my answer.

Loading one big file (one meaning of "module" in the Perl context) will not take the exact same amount of time, down to the attosecond, as loading several small files which are functionally equivalent.

Running code from one big namespace (another meaning of "module" in the Perl context) will not take the exact same amount of time, down to the attosecond, as running code which is spread across multiple namespaces.

If you look closely enough, refactoring always has an effect on performance, unless it is such a trivial refactor that the processor still runs the exact same opcodes.

But, in practical terms, that generally doesn't matter. And, if you're performance-sensitive enough that it does matter, then you'll get more benefits from using a high-performance language than you will from moving code around between files and/or namespaces.

That was the point of my answer: Don't waste your time worrying about micro-optimization. Which remains good advice even if I supported it with a poor example.

Finally, if you're going to say I'm "still completely wrong", please at least point out the complete wrongness of things I actually said. I never said that load times are potentially unmeasurable. I said the difference in load time between loading a single file and loading equivalent code from multiple files may not be measurable:

"the difference is completely unimportant, if there's even a measurable difference at all" (emphasis added)


In reply to Re^7: Does module size matter under mod_perl? by dsheroh
in thread Does module size matter under mod_perl? 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.