That's all well and good. But Crafty is around 50,000 lines of C. The primary search, evaluation, and such is well over 5,000 lines of C. Which will turn into 20-30K lines of assembly. _that_ is not so easy to support. Did that in Cray Blitz where we had over 20,000 lines of assembly written solely for speed. But what you gain in execution speed, you lose 100 times over in terms of making changes to the code. In the case of Crafty, I change things on a daily basis. Right in the middle of the search, or in the middle of the evaluation. From experience, that turns into a major effort when using assembly language.stegemma wrote:In fact assembly language gives you the "power" to optimize better. Because chess is a competitive game and chess programming lead us to competition... having the strongest tools could give you some advantage. At end only doing true games between programs will provide a measure of the goodness of the tools, algorithm, implementation and so on.bob wrote: ...
The only advantage for assembly language is none of those, it is purely performance, because we know things about the program that the compiler can't deduce, which lets us optimize better, but which also makes it harder to understand the program later.
The scope of the test reported, based on perft, was done only to show how we can get a faster program even at the first stage of developing. Maybe i was wrong comparing my perft with those of Crafty because my perft use the same procedures of the true program and is "implemented" only throwing away things from alfa-beta (no tree cutting, no hash tables...). I was thinking that even Crafty perft was done in the same way but now you say that is'nt true, so i'm wrong on that.
About the lines of code, Freccia engine is now:
- move generator: 991 lines
- alfa-beta 197
- data + debug routines: 692
For now i think that the program could be understood later, almost by me... but i will say that for sure only after some year from today.
The last aspect is very programmer depending. The same problem becomes from any language, i think.
I'm not sure how you would use a normal search for perft. There can be no pruning of any kind. Move ordering is irrelevant. No evaluation. Etc...