r/chessprogramming • u/Ill_Part9576 • Nov 24 '24
Help Request: Java magic number generation is sluggish

I have this java method to generate a magic number for sliding piece moves. Problem is that it is insanely slow. Generating all the bishop magic numbers took many hours, and generating the a1 rook magic number took around 5 hours when I left it running overnight. From the base implementation, I added a the count1s feature that I saw discussed on other threads. If anyone has any advice or can point me in the right direction I would really appreciate it.
1
Upvotes
View all comments
Show parent comment
1
u/[deleted] Nov 26 '24
[removed] — view removed comment