Since you’re here...

... we have a small favour to ask. More people, like you, are reading and supporting our blog: "Chess Engines Diary". And unlike many other sites and blogs, we made the choice to keep our articles open for all, regardless of where they live or what they can afford to pay.

We hope you will consider supporting us today. We need your support to continue to exist, because good entries are more and more work time. Every reader contribution, however big or small, is so valuable. Support "Chess Engines Diary" even a small amount– and it only takes a minute. Thank you.

============================== My email: jotes@go2.pl



Stockfish 16120309 - new version


Stockfish, UCI chess engine

Leader of the ranking list JCER = 3368

๐Ÿ”ฌ Author: Andrey Neporada 
More:

Timestamp: 1480754227 

Help GCC to optimize msb() to single instruction 

GCC compiles builtin_clzll to “63 ^ BSR”. BSR is processor instruction "Bit Scan Reverse". 
So old msb() function is basically 63 - 63 ^ BSR. 
Unfortunately, GCC fails to simplify this expression. 

Old function compiles to 
bsrq %rdi, %rdi 
movl $63, %eax 
xorq $63, %rdi 
subl %edi, %eax 
ret 

New function compiles to 
bsrq %rdi, %rax 
ret 

BTW, Clang compiles both function to the same (optimal) code. 

No functional change.


Stockfish 16120309 - download



Comments