develooper Front page | perl.macosx | Postings from January 2002

Array/Hash Growth

Thread Next
From:
James Edward Gray II
Date:
January 6, 2002 08:19
Subject:
Array/Hash Growth
Message ID:
7AD6CE10-02C1-11D6-8483-0003930388F0@mac.com
I'm writing a fairly large scale network app in Perl which is pretty 
dependent on timing.  In the process of optimization, I find myself with 
a lot of questions primarily about array and hash growth.

Is it a big gain to pre-extend the data structures?  With how many 
entries?

Does a newly created array/hash have a default capacity?

Are stacks (arrays, using push and pop) a performance strain because of 
the constant size changes?

Any information along these lines would be greatly appreciated.  Thanks 
for your time.

James


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About