Speed was not Ras's mian focus. His focus was that assembly is not needed to create a really strong engine. The main reason that I would use 64 bit assembler over C right now is because my jump table style of chess programming lends itself to using a small subset of the assembly instructions. And that allows me to work faster due to my memory limitations.abulmo2 wrote:What about asmfish ?Ras wrote:Stockfish has much less assembly (and half of it is even wrong, IMO) than Crafty and still plays stronger.
Doesn't it prove that assembly can provide faster engine than C++ ?
Code: Select all
iptmf dd 0
dd wpm,wpm,wpm,wpm,wpm,wpm,wpm,wpm
dd wnm,wnm,wbm,wbm,wrm,wrm,wqm,wkm
dd wck,wcq,wmter
dd cbcam
dd 0
dd bpm,bpm,bpm,bpm,bpm,bpm,bpm,bpm
dd bnm,bnm,bbm,bbm,brm,brm,bqm,bkm
dd bck,bcq,bmter
dd cwcam
iptcf dd 0
dd wpc,wpc,wpc,wpc,wpc,wpc,wpc,wpc
dd wnc,wnc,wbc,wbc,wrc,wrc,wqc,wkc
dd wcter,wcter,wcter
dd cbcac
dd 0
dd bpc,bpc,bpc,bpc,bpc,bpc,bpc,bpc
dd bnc,bnc,bbc,bbc,brc,brc,bqc,bkc
dd bcter,bcter,bcter
dd cwcac
wqmf dd 0
dd wqmnd,wqmnd,wqmnd,wqmnd,wqmnd,wqmnd,wqmnd,wqmnd
dd wqmnd,wqmnd,wqmnd,wqmnd,wqmnd,wqmnd,wqmnd,wqmnd
dd 0,0,0
dd wqmrm
dd 0
dd wqmrc,wqmrc,wqmrc,wqmrc,wqmrc,wqmrc,wqmrc,wqmrc
dd wqmrc,wqmrc,wqmrc,wqmrc,wqmrc,wqmrc,wqmrc,wmcbki
dd wnxtm
wqcf dd 0
dd wqcnd,wqcnd,wqcnd,wqcnd,wqcnd,wqcnd,wqcnd,wqcnd
dd wqcnd,wqcnd,wqcnd,wqcnd,wqcnd,wqcnd,wqcnd,wqcnd
dd 0,0,0
dd wqcns
dd 0
dd wqcrc,wqcrc,wqcrc,wqcrc,wqcrc,wqcrc,wqcrc,wqcrc
dd wqcrc,wqcrc,wqcrc,wqcrc,wqcrc,wqcrc,wqcrc,wccbki
dd wnxtc
wmg: push ebp
push edi
push esi
mov ebp,[ply]
mov eax,[first+ebp*4]
mov [lis+ebp*4],eax
mov edi,[nxt]
jmp [ptmf+edi*4]
wnxtm: mov edi,[nxt+edi*4]
jmp [ptmf+edi*4]
wqm: mov ecx,[ps+edi*4]
mov esi,[qol+ecx*4]
movsx ebx,[qns+esi+ecx]
mov edx,[brd+ebx*4]
jmp [wqmf+edx*4]
wqmrm: mov [tree.fsq+eax*8],cl
mov [tree.tsq+eax*8],bl
mov [tree.typ+eax*8],QMOV
inc eax
movsx ebx,[qns+esi+ebx]
mov edx,[brd+ebx*4]
jmp [wqmf+edx*4]
wqmrc: mov [tree.fsq+eax*8],cl
mov [tree.tsq+eax*8],dl
mov [tree.typ+eax*8],QCAP
inc eax
wqmnd: movsx ebx,[qnd+esi+ebx]
mov edx,[brd+ebx*4]
jmp [wqmf+edx*4]