List::Utils is great and was one the reasons I got around to upgrading. It replaced about half the routines in my personal utils module. The problem is that I need the min and max of each dataset, and iterating each dataset twice isn't ideal with huge datasets.

I agree with your reduction when the array is of a reasonable size, but each dataset is 786,432 elements, there are several datasets and the operation isn't a one-off, so building a list in the for loop is kind of expensive I think? Hence the choice to use the lazy evaluation of the range op in a for loop to index the elements. That problem goes away once we get lazy-evaluating in P6.

It still irks me that I have to type the operands, to what is essentially a binary operation, twice each, but it seems I'm the only one who sees that as a problem, and I don't relish causing, let alone being involved in, a 3 year p5p flame fest which I was told above is what it took to get ||= implemented:(.

It's the same "I know that everything is available in the cpu for the processing required" type ire that I feel about the need to do

my $n; my ($div, $rem) = ( int($n/10), $n % 10 );

as I pontificated on at A better mod (%) operator?. It's not a "performance thing",

 my ($div, %rem) = $n %% 10;

just seems cleaner. That I know that both values are available in the registers after either / or % means that even hiding the double division within a sub or overloading % or whatever still doesn't satisfy my sense of "once and once only:)


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

In reply to Re: Re^3: A set of new operators. In keeping with the design of Perl? (aliasing) by BrowserUk
in thread A set of new operators. In keeping with the design of Perl? by BrowserUk

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.