Java: white ? repeat : repeat;

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Posts: 17
Joined: Sun Nov 11, 2018 12:28 pm
Full name: Laurent Laborde

Re: Java: white ? repeat : repeat;

Post by ker2x » Sat Dec 01, 2018 8:25 am

Joost Buijs wrote:
Sat Dec 01, 2018 8:16 am
ker2x wrote:
Sat Dec 01, 2018 6: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
Posts: 198
Joined: Wed Apr 25, 2012 11:51 pm
Location: Oak Park, IL, USA
Full name: Erik Madsen

Re: Java: white ? repeat : repeat;

Post by emadsen » Sat Dec 01, 2018 2:32 pm

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:

Post Reply