Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Temp variable performace vs Inline behavior

by sundialsvc4 (Abbot)
on Jun 27, 2012 at 18:31 UTC ( #978785=note: print w/replies, xml ) Need Help??

in reply to Temp variable performace vs Inline behavior

Apart from the performance/capacity “edge cases” that I openly acknowledge BrowserUK (in particular) deals with every day, my bright-line rule always tilts in favor of: clarity, and maintainability.   In the world that I live in every day, it is “six o’one, half a dozen of the other” in terms of performance ... because raw speed in my world is rarely actually the issue.   (And to the extent that it may be, I look for a deeper algorithm change.)  

Certainly, to me, the first example is clear, and the second example would instantly fail my code-review:   in the second case, the code does not plainly say that parse_node() will be called once vs. twice.   I emphatically do not want to have to “understand Perl” in order to understand what a line of source-code says.   I want it to very plainly and unambiguously say precisely what it means.   (And if the compiler’s optimizer can improve upon it, goody for the optimizer and thank you for the freebie.)

Spoken from the point-of-view of a businessman who did lose $10,000.00(USD) in actual cash, that he most-emphatically could not afford to lose but also could not rightfully keep, due to code written by someone else that was not clear.   The cause of project-death was “cleverness.”   I could not find the bug because I could not identify it.   I had to borrow money fast.

  • Comment on Re: Temp variable performace vs Inline behavior

Replies are listed 'Best First'.
Re^2: Temp variable performace vs Inline behavior
by BrowserUk (Pope) on Jun 27, 2012 at 23:14 UTC
    I emphatically do not want to have to “understand Perl”

    Hoisted by your own petard!

    And it probably explains:

    I could not find the bug because I could not identify it.

    Would you trust or employ a lowyer who spoke English, but wasn't familiar with legal terminology?

    For example: One who didn't know the difference between "chattels" and "property"?

    Why should anyone employ a programmer for a Perl project, that knew COBOL, but didn't: ' “understand Perl” '?

    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.

    The start of some sanity?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://978785]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2019-11-20 09:14 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (96 votes). Check out past polls.