Search found 1969 matches

by mar
Wed Dec 25, 2019 2:15 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Programming for superscalar/pipelined/out-of-order/speculative CPUs?
Replies: 2
Views: 503

Re: Programming for superscalar/pipelined/out-of-order/speculative CPUs?

I mostly trust the compiler. Instruction scheduling, unrolling loops, avoiding branches if possible, auto-vectorization (to some extent, Microsoft compiler still lags behind quite a bit) - all this is what you get out of the box from modern compilers. SIMD intrinsics is one of the areas where it's s...
by mar
Tue Dec 24, 2019 10:55 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Pascal code to read a Polyglot book
Replies: 13
Views: 641

Re: Pascal code to read a Polyglot book

Roland Chastain wrote:
Tue Dec 24, 2019 9:08 am
Now it's a mystery for me how the C code can work. :|
Well in C, the 0 prefix denotes octal, so 7*8+7 = 63 :)
(does it mean that Eschecs will get an opening book soon? ;)
by mar
Sun Dec 22, 2019 12:44 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Trying to use ProDeo book in my program
Replies: 10
Views: 637

Re: Trying to use ProDeo book in my program

phhnguyen wrote:
Sun Dec 22, 2019 7:58 am
- The encoding (Little Endian) of integers from book data is not in the right order of typical OSs => you need to convert
You mean big endian :)
by mar
Thu Dec 12, 2019 2:15 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Eschecs, a simple GUI written in Pascal
Replies: 55
Views: 8833

Re: Eschecs 5.0.1 released

Fixed bug of application crashing when a piece was dropped out of the window. Hmm, I got another access violation when I mistakenly dropped a piece at the border of the chessboard while capturing (in a completely winning position against Moustique :) steps to reproduce: grab a piece and drop it at ...
by mar
Thu Dec 12, 2019 10:22 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: An AMD compiling hunch
Replies: 12
Views: 1094

Re: An AMD compiling hunch

The idea that GCC doesnt have a say is wrong. The goal of the compiler should be to produce the fastest binary given the information it has. If the information spawns from the "native" switch, then it should be doing more than just asking what instruction sets are supported, and the fact that it do...
by mar
Tue Dec 10, 2019 3:34 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Misprediction-poor looping
Replies: 9
Views: 661

Re: Misprediction-poor looping

dragontamer5788 wrote:
Tue Dec 10, 2019 3:05 pm
GCC still needs the #pragma omp simd to see that this loop is vectorizable for some reason
why? the code you posted is auto-vectorized by gcc regardless of any pragma, clang even unrolls the loop as well as msc
by mar
Tue Dec 10, 2019 9:47 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Misprediction-poor looping
Replies: 9
Views: 661

Re: Misprediction-poor looping

int todo[MAX]; int n=0; for(i=0; i<MAX; i++) { todo[n] = i; n += (Condition(i) != 0); } for(i=0; i<n; i++) Action(todo[i]); I use something similar but with different motivation. I often extract elements/pointers based on a condition into a (thread)local array for further processing. This is benefi...
by mar
Mon Dec 09, 2019 11:29 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Misprediction-poor looping
Replies: 9
Views: 661

Re: Misprediction-poor looping

Comment: For some reason, I couldn't grok your code in the first pass. My brain understands the following more: for(i=0; i<MAX; i++) { todo[n] = i; n += (Condition(i) ? 1 : 0); } Condition(i) ? 1 : 0 will probably compile into a cmov instruction, so you won't have any branches either. In fact, you ...
by mar
Sat Dec 07, 2019 12:37 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Eschecs, a simple GUI written in Pascal
Replies: 55
Views: 8833

Re: Eschecs 5.0.1 released

Hello! Eschecs 5.0.1 is available . Thanks, I missed the release it seems. Playing against Moustique is ideal for me, it lets me build up an advantage and then I blunder the win away to ultimately blunder the draw and lose. I'm a very lousy player :) (Alouette seems a bit weak for me) 100px pieces ...
by mar
Sat Dec 07, 2019 12:32 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Include 4men syzygy in an engine
Replies: 11
Views: 1308

Re: Include 4men syzygy in an engine

I've found the problem! In init_table there is this code: for (int t = 0; t < num; t++) { data = (uint8_t *)(((uintptr_t)data + 0x3f) & ~0x3f); ei[t].precomp->data = data; data += size[t][0][2]; if (split) { data = (uint8_t *)(((uintptr_t)data + 0x3f) & ~0x3f); ei[num + t].precomp->data = data; dat...