Author: Gian-Carlo Pascutto
Date: 11:53:12 09/27/01
Go up one level in this thread
On September 27, 2001 at 13:26:39, Dann Corbit wrote: >I have seen very dramatic increase in speed by passing pointers to large objects >instead of the objects themselves. For instance, if you have an 80 byte struct, >then a blank 80 byte area has to be pushed onto the stack and then the data >copied from the actual struct to the target area. In the case of recursive >calls, this can become prohibitive. It may be even more expensive than it looks >from looking at the memory utilization, because you might have a near balance of >pushes and pops during the search. > >Of course, this idea only works if you don't need to preserve the contents of >the struct between calls. I'm pretty sure I got that one right. Most of my data are global variables, so there isn't much copying to do anyway. Doesn't make for a very clean program though. -- GCP
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.