Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Anyone using STL?

Author: Franck ZIBI

Date: 01:22:48 07/26/02

Go up one level in this thread



Hello Russel,

For Pharaon, I am using now a std::vector to store the move list at each node.

Compared to the previous approach (a pointer to a C style move array), the slow
down for Pharaon was around 2%, so nearly no impact in strength.

As you have noted, the main drawback of a std::vector occurs when it is full and
needs to copy all its element in a new memory space.
To avoid it, you can give each move vector a big capacity (say 256 moves), using
the vector::reserve method.

BTW, I think that, due to the small size of a move list, a std::vector is better
fitted and simpler then a std::list .

Regards.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.