Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: array pre-allocation trick

by Aristotle (Chancellor)
on Nov 02, 2002 at 06:52 UTC ( [id://209914]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: array pre-allocation trick
in thread array pre-allocation trick

That very much depends on your setup. map can be the faster, slower or equal variant. There's too many constraints that play a role - you can't just say "this is faster" based on a minimal benchmark because the characteristics of each looping approach lend themselves to different data structure and control flow designs. If you take a forish approach, using map instead will be awkard - but the same is true in the reverse case.

Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 21:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found