Author: Russell Reagan
Date: 00:43:53 07/26/02
I was curious if anyone was using STL in their engine, or if that is a bad idea. For example, I considered using an std::vector to store my legal moves in during the search. After thinking about this, I realized it probably wasn't a good idea since vector allocates memory dynamically when calling push_back() (if the vector is full). The question I have is whether or not using a vector in this case is a good or bad idea, or if it won't really affect performance. I do recall that vector only allocates memory some of the time, since when it allocates memory from multiple push_back()'s, it double's it's capacity, so it doesn't allocate memory every call to push_back(). How about using a list? I don't think that would be any better than using a vector, if there is anything wrong with vector at all. Any thoughts? Russell
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.