Search found 142 matches

by Fulvio
Sun Oct 30, 2016 4:56 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: couple of questions about stockfish code ?
Replies: 95
Views: 11427

Re: couple of questions about stockfish code ?

I think so, because almost all of the evaluation functions returning Score structs should be getting inlined anyway. Just to be 100% sure, can you please also test the current implementation wrapped inside a struct: struct Score { int32_t data_; inline Score operator+(const Score& a) c...
by Fulvio
Sat Oct 29, 2016 11:11 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: couple of questions about stockfish code ?
Replies: 95
Views: 11427

Re: couple of questions about stockfish code ?

https://github.com/syzygy1/Stockfish/compare/official...syzygy1:score_struct The slowdown is about 3.5% on my system. Please let me know if the operators can somehow be implemented more efficiently. Thanks, this is interesting. I've tried the code, but Visual Studio 2015 is not able to inline the o...
by Fulvio
Fri Oct 28, 2016 12:25 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: couple of questions about stockfish code ?
Replies: 95
Views: 11427

Re: couple of questions about stockfish code ?

Would you see a difference between a struct of two 32-bit integers and a struct of two 16-bit integers? This is a wonderful tool: https://godbolt.org/ I quickly tried this code: #include <stdint.h> int main() { volatile struct { int a; int b; } test1; test1.a += 1; test1.b += 1; ...
by Fulvio
Thu Oct 27, 2016 11:43 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: couple of questions about stockfish code ?
Replies: 95
Views: 11427

Re: couple of questions about stockfish code ?

Why do you think that using TWO registers to keep track of the aggregated score in evaluate() instead of just one incurs no performance penalty? Please stay calm, I already posted the link that explains that: "So for x86-based processors, the front-end does two main things - fetch instructions (fro...
by Fulvio
Thu Oct 27, 2016 10:37 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: couple of questions about stockfish code ?
Replies: 95
Views: 11427

Re: couple of questions about stockfish code ?

Addition of score values is far more frequent than encoding/decoding. I'm pretty sure using a struct of two 16-bit ints would be measurably slower. Maybe you should read this: https://en.wikipedia.org/wiki/Instruction-level_parallelism https://software.intel.com/en-us/blogs/2011/11/22/pipeline-spea...
by Fulvio
Thu Oct 27, 2016 8:50 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: couple of questions about stockfish code ?
Replies: 95
Views: 11427

Re: couple of questions about stockfish code ?

inline Score make_score(int mg, int eg) { ScoreView v; v.half.mg = (int16_t)(mg - (uint16_t(eg) >> 15)); v.half.eg = (int16_t)eg; return Score(v.full); } The standard 4.7 interger coverversion says: 1) "If the destination type is signed,...
by Fulvio
Mon Oct 24, 2016 10:14 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: A PGN parser
Replies: 31
Views: 6557

Re: A PGN parser

mcostalba wrote:
Does it check and validate every move?
Yes; it also converts the moves into Scid format (avoiding the conversion improves the speed by another 30%).
by Fulvio
Mon Oct 24, 2016 8:44 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Max moves in a position
Replies: 21
Views: 3893

Re: Max moves in a position

The array is filled in from position 0 through the max with no unused values between each ply, which makes it about as cache-friendly as can be done. This is an interesting talk about "Hybrid Data Structures" used by LLVM: https://www.youtube.com/watch?v=vElZc6zSIXM The idea is to allocate a small ...
by Fulvio
Sun Oct 23, 2016 11:09 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: A PGN parser
Replies: 31
Views: 6557

Re: A PGN parser

I don't have a very fast PC, but I think this is quite fast. I would be interested in hearing from people that went though this already or that can suggest something alternative that perhaps I have missed. Thanks. On my pc (q6600 + SSD) Scid (scid.sourceforge.net) takes 10 seconds for a file of sim...
by Fulvio
Mon Oct 03, 2016 4:40 pm
Forum: Computer Chess Club: General Topics
Topic: A new version of Scid is available [4.6.4]
Replies: 30
Views: 7620

Re: A new version of Scid is available [4.6.4]

[quote="Jesse Gersenson"][quote="Ozymandias"][quote="Jesse Gersenson"]Wow, it's fast!! Scid 4.3 took 16 seconds to open my database. Version 4.6.4 takes a second![/quote] How about tree browsing? It was already quite fast under Windows, if it gets any faster, it will simply leave Chessbase in the du...