Author: Anthony Cozzie
Date: 06:42:30 06/24/04
Go up one level in this thread
On June 24, 2004 at 09:03:57, Gian-Carlo Pascutto wrote: >On June 24, 2004 at 07:56:32, Anthony Cozzie wrote: > >>Bob's code looks like this in assembly: >> >>if(wtm) >>{ >> xor eax+0x334, ebx //take memory at eax+0x334 and xor it with ebx >> ... >> >>Your code would look like >> >> xor eax + 8*ecx + 0x334, ebx >> ^--- Index register >> >>Register pressure is one of the biggest problems with bitboards on x86. Just >>having 1 bitboard in registers requires almost 1/3 of the registers. > >I don't see how this is possibly a justification: > >1) Because of the same register pressure you're talking about, most of the >data in x86 is retried from caches. Duplicating code is not helping >cache pressure. It is a tradeoff <shrug> I am not good enough to say whether it is better to have a 10% bigger binary or more dcache accesses; I am just explaining Bob's rationale. >2) You need to handle the branch too. The cost of that is going to be way >higher than the cost of setting up/restoring a register. Obviously, pawns[X] is better than (turn ? wpawns : bpawns). However, in the code we are talking about there is 1 branch for perhaps 100 accesses. anthony
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.