Search found 6 matches

by Lasse Hansen
Tue Sep 15, 2015 2:54 pm
Forum: Programming and Technical Discussions
Topic: To shift or not to shift
Replies: 14
Views: 8275

Re: To shift or not to shift

BTW if this is a 64 bit compile, you have a ton of registers the compiler can use. cl/cx/ecx/rcx should not be an issue.
I use Ubuntu 14.04 64 bit, gcc and g++ version 4.8.4

BTW, if using 1<<shift and not table, the code to clear a bit may be:
inline U64 ClrBit(int sqr) { return rol(-2ull,sqr ...
by Lasse Hansen
Mon Sep 14, 2015 3:55 pm
Forum: Programming and Technical Discussions
Topic: To shift or not to shift
Replies: 14
Views: 8275

Re: To shift or not to shift

That is still only an extra load from memory, same as the table lookup.

Are you sure you are measuring what you think you are? IE your test program was totally wiped out by the optimizer.
Yes, I tried both with my C-engine Sillycon, and with my new C++ perft program.
For Sillycon the speed in NPS ...
by Lasse Hansen
Mon Sep 14, 2015 2:28 pm
Forum: Programming and Technical Discussions
Topic: To shift or not to shift
Replies: 14
Views: 8275

Re: To shift or not to shift

I don't see how it can be faster. A shift is a one cycle instruction. An array lookup requires the address computation and a cache probe.
Well, its faster for me (tested it once again). It might be that when using variable shift the RC register is clobbered, due to the use of CL, and the RC ...
by Lasse Hansen
Sun Sep 13, 2015 8:53 am
Forum: Programming and Technical Discussions
Topic: To shift or not to shift
Replies: 14
Views: 8275

Re: To shift or not to shift

My experience is that a table lookup for SetBit() is always faster than shift, both with my perft and my engine.
I use ClearBit(sqr) = ~SetBit(sqr) together with this, instead of a separate table for clearing a bit.
It is easy to change to using shift later though.
This is on an i7-2600K.

Regards ...
by Lasse Hansen
Wed Aug 26, 2015 8:13 pm
Forum: Programming and Technical Discussions
Topic: Winboard 2 state diagram
Replies: 3
Views: 3121

Re: Winboard 2 state diagram

I dont know about state diagram but this link tells pretty much about the winboard protocol 2.

http://www.gnu.org/software/xboard/engine-intf.html
by Lasse Hansen
Mon Aug 19, 2013 7:40 pm
Forum: Programming and Technical Discussions
Topic: qsearch question
Replies: 2
Views: 2599

Re: qsearch question

The point with the beta cutoff using eval score is that a capture sequence may (normally) be abrupted, so if the side to move chooses a non-capture the (eval) score of the position will probably be above beta. I believe this is called stand-pat.

Regards, Lasse