Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: cross combinations

by tilly (Archbishop)
on Oct 29, 2005 at 03:04 UTC ( [id://503824]=note: print w/replies, xml ) Need Help??


in reply to Re^3: cross combinations
in thread cross combinations

Lazy lists are nice if you don't need the entire thing - if you need the entire thing, it hardly matters.

I heartily disagree. If the list is large and you don't need the entire thing at once, then being lazy saves you a lot of memory, and can be the difference between getting an answer a minute later, and having your program crash. (For instance that's why you want to use while to loop through a large file rather than for.)

Combining lists quickly creates a combinatorial explosion where you really don't want it all in memory if you don't need it there.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://503824]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-25 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found