Author: Pete Galati
Date: 15:05:39 08/19/99
Go up one level in this thread
On August 19, 1999 at 17:30:45, Dann Corbit wrote: >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. Thanks, I've copied this to a txt file for reference, I've generally stumbled when combining .c files but you seem to be #include ing them at the top of a main.c type of file, Pierre seems to do that. On my revised version of SCP I've used -O7, that produced marginaly better nps than other numbers. I general test it with 1. a4 and right off the bat it goes into a search because my new book has nothing to cover that. On my computer your version gets 7651 nps and the best I've gotten w/my version is 6653 nps. I tried the -pedantic out of your makefile and it was no help for use with DJGPP. I allways thought that -Wall was just for throwing warnings at you. I've never tried -ansi, I figure that SCP is ansi now, but it's original code probably wasn't, I don't know what -ansi is doing, it's one I'll try. I'm finding that -DFAST seems to help, don't know why, I borrowed it from Crafty's makefile. Pete
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.