Using PEXT on AMD processors

Discussion about development of draughts in the time of computer and Internet.
Post Reply
Ed Gilbert
Posts: 744
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Using PEXT on AMD processors

Post by Ed Gilbert » Tue Jun 19, 2018 18:10

After Joost Buijs wrote on another forum that the PEXT instruction is very slow on AMD processors, I decided to check it, as kingsrow uses PEXT in the indexing for the eval function. I check if PEXT is available and use it if it is. It normally gives about a 10% search speedup. If PEXT is not available, a software emulation is used that does a few shifts and AND/OR's.

Krzysztof has an AMD TR4 Ryzen Threadripper 1950x. He kindly ran an experiment for me and recorded these kingsrow search speeds:

- Using my software emulation of SHIFT/AND/OR's: 6712 KN/s
- Using the PEXT intrinsic: 3072 KN/s

PEXT is *really* slow on AMD! I will modify kingsrow to not use it on AMD.

-- Ed

Post Reply