Author: Dann Corbit
Date: 14:30:45 08/19/99
Go up one level in this thread
Two more comments: 0. C and C++ compilers can only inline what they can see. So to get the most out of inlining, you need to include all the source in one file. I do it with a technique like this: /* ** Translation unit blob.c */ #include "file0.c" #include "file1.c" #include "file2.c" #include "file3.c" #include "file4.c" #include "file5.c" ... #include "filen.c" /* ** End translation unit blob.c */ Then I compile blob.c. 1. You can get considerable increase in speed by putting the files in the right order. Since there are a lot of permutations, it makes sense to use your head. For instance, you should include a function just before its first use, and also, you should put functions that call each other as close to each other as possible. For GCC, I have found the flags: bash-2.02$ gcc -O9 -mpentiumpro -march=pentiumpro -Wall -ansi -pedantic Do very well. You can use any number bigger than 2 after the -O flag and you will get the same effect. I just put in a 9 for my own strange sense of humor.
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.