ARE MY PERL SCRIPTS GOING TO RUN SLIGHTLY FASTER IF I DON'T USE STRICT AND WARNINGS?
Yes, in some cases at least, they will probably run slightly faster. Very slightly faster. In fact, so slightly faster that you probably won't be able to notice. And that will not be significant in probably more than 99.9% of the cases. If you have a program that runs in, say, 20 minutes, why should you care about saving a few seconds? In brief, this is really irrelevant.

But that's most probably the wrong question to ask. IMHO, the right question is: will my program be developed and debugged faster if I do use strict and warnings? And, there, the answer is a big YES. Your program is very likely to be ready and working correctly earlier if you do use strictures. Quite often much earlier. Strictures can (and will) save you literally hours of useless debugging time, for example when you made a stupid typo on a variable name (and we all do that type of silly mistake), especially if your program has more than a few dozen lines.

From an economic standpoint, developer's time is usually worth much more money than CPU time. Especially, an hour of developer's time is worth million times more than milliseconds or microseconds of CPU time. Save your own time, don't worry about silly micro-optimizations or your code.

Update: Fixed a typo (s/if/is/) in the last paragraph. Thanks to 1nickt for pointing it out. And also a duplicate word in the first paragraph. Thanks to AnomalousMonk for noticing.


In reply to Re: Why use warnings? -w by Laurent_R
in thread Why use warnings? -w by harangzsolt33

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.