Author: Dann Corbit
Date: 15:47:02 01/13/05
Go up one level in this thread
On January 13, 2005 at 18:07:19, Eric Oldre wrote: [snip] >I guess this news is bitter sweet, no need to re-code a big part of my engine. >But no cheap gains in speed to be had either. Do you have a profiler? The Intel profiler is the best I have seen, but even the free Gprof will give you valueable information. If you want to find out where the time is going, a profiler is a very profitable step. Some things to watch for... 1. Passing large structures or classes by value. This can be trivial or impossible to fix, depending on what you are doing with the object 2. Any nested loop in a time path critical function. Can you precompute? Is the nested loop really necessary for every call? Can you do a table lookup or some other alternative? 3. Big data tables that are auto in frequently called functions (they will initialize every time unless you make them static.) If you do not change the data in them, declare them as static const and they won't load over and over. But before you do anything else, profile it and find out where your time is going. Typically, you will see 80% of the time eaten by 10% of the code. That is where to look for speedups.
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.