I am sorry that I made an error

Thank you, and respect.

Here are 3 runs each of 5.10.1 (my default installation) and 5.18.0 (self-compiled with MSVC VS v9.0) both running under Vista + SP1 on my hardware:

C:\test>IdiotsBench.pl Rate idiomatic-my-sub map-my-scope-sub idiomatic-my-sub 10817/s -- -7% map-my-scope-sub 11597/s 7% -- C:\test>IdiotsBench.pl Rate idiomatic-my-sub map-my-scope-sub idiomatic-my-sub 11113/s -- -8% map-my-scope-sub 12126/s 9% -- C:\test>IdiotsBench.pl Rate idiomatic-my-sub map-my-scope-sub idiomatic-my-sub 10760/s -- -11% map-my-scope-sub 12126/s 13% -- C:\test>\perl5.18\bin\perl.exe IdiotsBench.pl Rate map-my-scope-sub idiomatic-my-sub map-my-scope-sub 10426/s -- -9% idiomatic-my-sub 11438/s 10% -- C:\test>\perl5.18\bin\perl.exe IdiotsBench.pl Rate map-my-scope-sub idiomatic-my-sub map-my-scope-sub 10455/s -- -7% idiomatic-my-sub 11269/s 8% -- C:\test>\perl5.18\bin\perl.exe IdiotsBench.pl Rate map-my-scope-sub idiomatic-my-sub map-my-scope-sub 10521/s -- -7% idiomatic-my-sub 11263/s 7% --

So yes, the balance of power has shifted slightly.

my initial point has never been about performance anyway, but only to suggest a possible explanation for the OP's original question.

Which I understood to be so. But, there is no logical reason for denigrating the use of map in a void context.

Your argument for clarity -- an argument that is very close to my heart -- is false also; because it relies upon the assumption, or presumption, that map *must* return a list; rather than just 'applies a function to a list'.

You are (relatively) new around here; and I urge you to read and digest the writings of Abigail/Abigail-II, there is little that s/he said on the subject of Perl that isn't worthy if serious note.


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^9: Write code diferently (A little knowledge is a dangerous thing.) by BrowserUk
in thread Write code diferently by madM

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.