Path: chuka.playstation.co.uk!news From: Jim Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Arrays or Linked Lists? Date: Tue, 13 May 1997 04:19:04 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 33 Message-ID: <3377DDA8.696E@micronetics.com> References: <3378812B.DE6@aisb.ed.ac.uk> NNTP-Posting-Host: jim.micronetics.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.0b2 (Win95; I) X-Priority: 3 (Normal) Gordon Bell wrote: > I was wondering why the SCEE demos use > arrays for the object lists. If you already know the max sizeof a dynamic structure you may aswell allocate it as an array. Linked lists may be poetically elegant but just think of the time it takes to allocate a node from the heap every time you add or delete an element. As far as arrays or linked list are concerened it really is 'horses for courses'. A game/demo has a very ridged internal structure that is not really going to change much during run time, to do so would waste alot of valuable processing time that could be put to better use. > Is it because Lewis et al hate using pointers and linked lists, or is > there a more scientific explanation?! The demo programs are just that, demos. To implement ADT in them would just confuse the issue. I would also think that the development time would increase if you were to implement advance data type and for no extra net gain. Tracking wafty pointers in the debugger would cause some real head aches. > > Gordon Cheers Jim