Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Temp variable performace vs Inline behavior

by sundialsvc4 (Abbot)
on Jun 27, 2012 at 22:31 UTC ( [id://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.

Replies are listed 'Best First'.
Re^2: Temp variable performace vs Inline behavior
by BrowserUk (Patriarch) 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-03-29 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found