Java: white ? repeat : repeat;

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

ker2x
Posts: 17
Joined: Sun Nov 11, 2018 1:28 pm
Full name: Laurent Laborde

Re: Java: white ? repeat : repeat;

Post by ker2x »

Joost Buijs wrote: Sat Dec 01, 2018 9:16 am
ker2x wrote: Sat Dec 01, 2018 7:50 am feel free to skip at 30:00 if you want to see what i'm talking about when i wrote about bit shifting.
When you multiply by 2 you can do even better than << 2
Haha, I always thought it was << 1, always good to learn something new.
woops :D
User avatar
emadsen
Posts: 434
Joined: Thu Apr 26, 2012 1:51 am
Location: Oak Park, IL, USA
Full name: Erik Madsen

Re: Java: white ? repeat : repeat;

Post by emadsen »

I have a surprise for you : Clang notice you're doing a popcnt and replace the code with the asm instruction
Very nice. But that's why I measured it to confirm it was indeed faster with my compiler and runtime. Theory is great, but if you want to know which horse is faster, then race your horses.
My C# chess engine: https://www.madchess.net