Author: Robert Hyatt
Date: 10:34:08 10/24/03
Go up one level in this thread
On October 24, 2003 at 10:44:46, Vincent Diepeveen wrote: >On October 23, 2003 at 23:08:48, Russell Reagan wrote: > >>On October 23, 2003 at 22:24:38, Vincent Diepeveen wrote: >> >>>>>What i also do avoid in diep is writing out code for black and white. I have >>>>>neat loops there where easily possible: >>>>> for( side = 0 ; side <= 2; side++ ) >>>> >>>>Pawns always break symmetry anyway, so it doesn't work 100%. >>> >>>Not sure whether there's already snow falling in your country, hiding the shape >>>of the board, but mine is 8x8, so that's mirrorable in 2 ways at least. >>> >>>So with a bit of good coding 1 pattern can be used 4 times here and you write >>>down it 4 times. >>> >>>Good luck. >> >> >>If you used C++ you could use templates and write it once and use it however >>many different ways you'd like, and it will be resolved at compile time, unlike >>your loops. > >I want loops. That's *way* faster for modern processors like itanium2 and P4. >P4 has 12K (soon 16K) tracecache where it can read up to 4 instructions from >(which are not instructions like assembly instructions but basic processor >instructions) and those can get executed. > >So where in crafty everything is written out for black & white, in diep i can >reuse a lot of code, especially loops are great for that. > >Writing out stuff for black & white with templates, macros/defines whatever or >some clever usage of the same C file with different defines (like ZZZZZZ used to >do) it's all big big big BS. > >Future processors will do more instructions a clock and neat loops simply kick >butt then. No they don't. They will like unrolled loops to eliminate dependencies that kill things. > >Right now compilers only worry is to keep filled the instruction cache. > >That should tell you something about my approach is the best. It tells me _something_.
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.