Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 2:27 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ]  Bookmark and Share
Author Message
 Post subject: small collections VS large arrays
PostPosted: Wed Jun 20, 2007 9:46 pm 
Offline

Joined: Thu May 03, 2007 7:07 pm
Posts: 3
Location: TX, USA
Hi, I was just wondering if in some cases collections can use less memory than arrays. Collections (like an ArrayList) are simply objects linked to each other with no maximum size, right? But arrays allocate memory for their contents when they are created, right? (Correct me if I'm wrong, please.) So, for example, would an ArrayList with 50 objects use less memory than an array with a length of 1000 but only containing 50 objects?

_________________
(\__/)
(='.'=)
(")_(")
This is bunny. Help bunny gain world domination by copying him into your signature.

"Efficiency is intelligent laziness." ~David Dunham


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley