jordanbray/chess

[Question] Why does Square allow above 63?

Closed this issue · 1 comments

Why is it allowed to pass in a number greater than 63 to make a new Square? Is this the reason why it is unsafe and thats contaminates everything else? Is it a lot faster compared to just defaulting to make_square instead? If so, how big is the speed difference?

Just some questions I had if anyone can help me understand.

It no longer does. It was a lot faster. This library is very old (pre-rust 1.0), and the early compiler did not support the same level of optimization as it does today.

I got a lot of the unsafe cleaned up today, and actually made the library a bit faster, but still more to do.