Author: Magoo
Date: 11:54:01 05/12/03
Go up one level in this thread
I had this problem a few weeks ago, my chess program used alot of functions calls and made the engine very slow. I then added the "inline" thingy, but the compiler didn't inline the functions, and then tried with making these small functions to macros and that showed very clearly that the compiler decides when to inline or not. I got some enourmous increases for some functions, one which was called 40 Million times made the engine about 20sec faster (as macro). If you use gcc, the option "-O3" gives you a 3 pass optimization. you must have this if you want to inline, i think the compiler also inlines functions by itself.
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.