likeawizard / chess-go

Chess engine with lichess.org bot-play integration. Discontinued. Further development migrated to https://github.com/likeawizard/tofiks
2 stars 0 forks source link

Try branchless min/max for performance #45

Open likeawizard opened 2 years ago

likeawizard commented 2 years ago

Branching can be expensive due to CPU branch prediction. Avoid the use of if-else statments and replace them with branchless algorithms. Branchless usually involves more operations but can be better scheduled on a CPU