Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^8: returning large arrays from functions

by Anonymous Monk
on Nov 19, 2010 at 14:55 UTC ( [id://872516]=note: print w/replies, xml ) Need Help??


in reply to Re^7: returning large arrays from functions
in thread returning large arrays from functions

My mistake.

So it's 'not copying for any reason' that is a special case of COW.

Now it all makes sense.

  • Comment on Re^8: returning large arrays from functions

Replies are listed 'Best First'.
Re^9: returning large arrays from functions
by ikegami (Patriarch) on Nov 19, 2010 at 15:28 UTC

    The copying would have to occur on write, except no writes occur when the buffer is still shared.

    You've been doing nothing but misrepresenting what I've said. Ask questions if there's something you don't understand, but please stop putting words in my mouth.

      All the words come directly from your posts. No one but you put them there.

      The OPs question related to returning large volumes of data from subroutines. That inherently means that by the time the caller is running and has access to the returned data, the subroutines has ended. There can be no possibility of "shared access".

      In other words, your even mentioning the term COW in response to the OPs question is entirely vacuous. Citing it as a reason why Perl copies rather than aliases the returned data, completely erroneous. Terming "not copying" as a "special case of COW", fatuous.

      Continuing to defend those, is priceless.

        Sorry, I won't continuestart to defend these falsely attributed statements. I didn't even speculate as to why Perl behaves as it does.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://872516]
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-04-20 02:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found