On Thu, 2008-04-10 at 01:51 +0100, [EMAIL PROTECTED] wrote:
> Hey I am new to this list and Perl in general. I was wondering which 
> would be faster between a hash and an array with  a large (1000000+) 
> size? specifically I need to be able to add new elements and access the 
> lower elements in sequential order. I'm basically finding large prime 
> numbers.

Hashes are array's with an extra bit of magic ,  this means arrays will
always be faster for straightforward accessing of data.

If you are finding primes then your data will most likely be fairly
sparse
so an array might not be that suitable , what do you intend to use as
a key ?

Toodle-pip
Amias
-- 
 Freelance programming , consultancy and hardware builds
blog.amias.org.uk * www.amias.org.uk * www.ecotalk.org.uk


_______________________________________________
BristolBathPM mailing list
[email protected]
http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm

Reply via email to