I'd like to repose your question, but with a broader scope to encompass a lot of the discussion that's taken place on this thread and a spin on it for some perspective:

Let's have a look at The Win32 Shootout so we have a reference point. My version of the question would be: Is there a relationship between readability & performance? (Be it negative or otherwise)

I ask the question because I think it's fair - if you have to trade readability for anything then performance should be on the top of the list.

I'll start by saying that it's a very difficult thing to measure because 'readability' is subjective. We all have our own experiences & to some people sweetened/verbose code is more familiar while to others it clutters up the algorthyms and makes it harder to see the Big Picture.

But even so, is there a trend? It might seem intuitive that the most cryptic optimizations are usually those that perform best, but is it actually so?

I realize that performance isn't the key quality that we're measuring here. But in my experiece there's a negative relationship between compatability & efficiency (the classic example is XML vs. binary data) and so I'm wondering if there's a relationship to readability. Any thoughts? I mean fundamentally there's a reason why we all don't write in assembler, right?



Wait! This isn't a Parachute, this is a Backpack!

In reply to Re: "Perl is read-only!" by gregor42
in thread "Perl is read-only!" by Pic

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.