in reply to Re: Optimising concat (was Order of evaluation/interpolation of references)
in thread Order of evaluation/interpolation of references

Reguarding the update,

Thankyou for re-reading. The update is just a re-iteration of the original content.

On my 64-bit system, minimum allocations are 8 bytes. (64-bit alignment).


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?

  • Comment on Re^2: Optimising concat (was Order of evaluation/interpolation of references)

Replies are listed 'Best First'.
Re^3: Optimising concat (was Order of evaluation/interpolation of references)
by ikegami (Patriarch) on Mar 09, 2012 at 23:05 UTC

    It just occurred to me that using a list concat would cause the OP's

    print "${X()} ${X()}\n";

    to behave the same as his

    print "${X()}${X()}\n";

    Faster AND fewer surprises :) (Or is it su-prises?)

    Of course, the OP will still be surprised by the difference in

    $ perl -E'my $x=5; sub X { \(++$x) } say ${ X() } + ${ X() };' 14 $ perl -E'my $x=5; sub X { \(++$x) } say ${ X() } + 0 + ${ X() };' 13
Re^3: Optimising concat (was Order of evaluation/interpolation of references)
by ikegami (Patriarch) on Mar 09, 2012 at 03:02 UTC
    Poor choice of words on my part. I meant "Guessing from the update".