Do you know where your variables are? | |
PerlMonks |
Re^3: way to find module memory usage?by BrowserUk (Patriarch) |
on Jun 07, 2018 at 01:04 UTC ( [id://1216075]=note: print w/replies, xml ) | Need Help?? |
That certainly helps, though I would still like to see numbers! My guess as to why noone has written a module for that is that it is of no great concern. Example, I have a generated perl file that basically was created to optimise a very heavily nested set of loops (over 100), by unrolling those loops. It is just under 4MB in size:
And consists of just over 50kloc:
When run, it executes 2.3 million lines:
I just tacked these two line to the bottom of the file:
And when run, it produces:
So 50kloc of code compiles to <200MB of memory. Unless you're using Moose, the size of the code usually pales in significance with respect to the data. And the great benefit of properly optimised debug blocks is the removal of the condition test within inner loops and the runtime it saves. Not what you want to hear, but it might set your mind at rest about a few lines of debug. 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". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.
Suck that fhit
In Section
Seekers of Perl Wisdom
|
|