Author: Michel Langeveld
Date: 09:59:42 02/15/05
Go up one level in this thread
On February 15, 2005 at 12:26:36, Pallav Nawani wrote: >Hi, > >My chess engine, Natwarlal is very slow, getting 350KNPS on an Athlon 1700. >Crafty, on the other hand does an hefty 650K. What is the most important thing >for high NPS of the engine? There are a few speedup tricks that I know, and I am >not using them, but can anyone quantify the speedup in % provided by these, >and/or add some new ideas? > >1. Pawn hash (Natwarlal uses it, but not efficiently). >2. King hash >3. Eval cache >4. Lazy eval. Natwarlal dosen't use this, but then Natwarlal's eval is very >skimpy already! >5. Any other trick? > >Thanks, >Pallav Besided what the profiling that Dann told. compiler stuff: * select a fast language (assembler? c? etc?) * use a fast compiler (64bit os? intel? msvc2005? gcc? etc?) * compile with all optimizations on, and test on and off with each option. * include everything in one big file instead of multiple files chess related: * try all items in many ways and use the fastest - so work hard * try different algoritms and use the fastest - so work hard * use the hashmove, and skip generating moves in many positions) if you want squeez the last exra bit .... (and make it unreadable and impossible to go on ... finally): general: * keep your code compact as possible, or test to write some other items out * make items global, instead of passing them to each functions: like board * look at your eval, and keep some items incremental instead of updating each items from scratch again and again * making some items const instead of variable * test the speed difference of the members in a struct * test the speed difference of the type of a variable (int,long, short, char, etc). * try to use as less as possible if (b) but use lookup tables instead * don't make your lookup tables too big ... in order to keep your program size as small as possibel * program import stuff in assembler more?
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.