Linked List Vs Array

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Linked List Vs Array

Postby BrettVsop » 17 Nov 2007, 21:40

Is it faster to use linked lists to store move lists as opposed to arrays?
BrettVsop
 
Posts: 50
Joined: 04 Nov 2007, 18:32

Re: Linked List Vs Array

Postby Onno Garms » 17 Nov 2007, 22:31

May depend on what you do with your move lists, but moste likely arrays are faster.
User avatar
Onno Garms
 
Posts: 128
Joined: 17 Feb 2007, 11:17
Location: Bonn, Germany

Re: Linked List Vs Array

Postby Richard Allbert » 25 Dec 2007, 15:25

Hi,

A bit late for a reply... but just for info, when I first started trying to make a chess program, I used linked lists (as per my C++ reference book). The prgram was very slow.

Then, I read some of the open sources out there, and realised the fixed array method was always used, implemented it and saw a 7x speed up in the program.

Richard
Richard Allbert
 
Posts: 105
Joined: 27 Sep 2004, 11:56
Location: Aschaffenburg, Germany


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 27 guests