What is the benefit of ... <ludicrously over stated straw man>

How do you know that the OP is asking how to spend hours in order to save 2 seconds and 100 MB?

Isn't it at least vaguely possible she has an application that is currently using all of her memory and she knows that it needs to grow?

Could it be that that her application is currently taking hours or even days to run and that is simply to slow for the duty cycle she would like to be able to run?

May be her application is a web-app that is gaining currency and clients, and whilst previously the fact that it used 1 GB of memory and took 30 or 40 seconds to return the results to the users was acceptable because it was only being used by a few people and no paying clients; the numbers now using it mean that each users copy is impacting every other concurrent users copy and slowing them all down.

Maybe her choices are to spring for a substantially more expensive server/vm or to try and reduce the resources it uses so at to avoid that.

Who says that it will "take hours" to optimise her application. There are a dozen or more instances of questions on this site where OP code has been speed up by orders of magnitude and/or had its memory footprint reduced by similar factors by one or a few simple changes to the way they were coded.

The problem I have with your post is that it takes the minimal information provided -- basically the word "optimise" -- dreams up a moronic worst case scenario; applies an out-of-context, fatuous high-horse attitude and tries to score points by trotting out a party line truism of dubious benefit.

Maybe all your programs run serially in 5 seconds and never tax your laptop; but some of us run serious code that requires serious amounts of resource; and that seriously benefit from being coded in a way that makes best use of those resources available.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^4: How to optimize CPU and Memory usage? by BrowserUk
in thread How to optimize CPU and Memory usage? by ThelmaJay

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.