Computer Chess Club Archives


Search

Terms

Messages

Subject: Thanks - absolutely convincing!

Author: Gerd Isenberg

Date: 10:43:03 03/31/04

Go up one level in this thread


On March 31, 2004 at 12:57:09, Eugene Nalimov wrote:

>On March 31, 2004 at 04:15:21, Gerd Isenberg wrote:
>
>>Looks fine ;-)
>>
>>Curious about call __chkstk in isDeBruijnN, but not in the recursive function
>>genDeBruijn. Yes, isDeBruijnN has a local 4KByte array on the frame, and has to
>>clear it too, so under runtime considerations call __chkstk doesn't matter much.
>>Instead of call memset i would prefere an inlined intrinsic of that e.g. with a
>>8-byte aligned bool array and REP STOSQ with rcx=4096/8. I guess there are some
>>additional compiler flags...
>>
>>If you have some additional time, it would be nice to see the assembly of a
>>kogge-stone filler with a bit more register pressure:
>>
>>Thanks again,
>>Gerd
>
>_chkstk() call is necessary if function allocates more than 4k on stack.

I see - a page issue?


>
>memset() call is faster than REP STOSQ. Trust me. BTW, the old version of the
>compiler would generate REP STOSQ.

Yes, interesting. Curious about what is inside memset ;-)


>
>And here is your assembly:

Wow - absolutely convincing!

Nice that all is inlined inside main, but the single functions are incarnated or
listed separately.

One minor point i don't understand inside the general purpose incarnation:

updownAttacks<GPR>, COMDAT
...
; Line 222
        ...
	mov	QWORD PTR [rax-72], rbp
        ...

; Line 224
	movaps	xmm0, XMMWORD PTR [rax-72]
	movdqa	XMMWORD PTR [rax-72], xmm0

Some undocumented trick?

To load xmm0 as packed single float and to store it back to the same address but
as packed int. Doesn't that imply some type penalty cycles, despite the fact
that the load/store seems not necessary at all and may even introduce a 128-bit
load stall due to the previous 64-bit store?

Thanks,
Gerd

<code snipped>



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.