Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: odd msc 2005 behaviour - 64-bit mode

Author: Gerd Isenberg

Date: 11:14:09 06/13/05

Go up one level in this thread


On June 13, 2005 at 13:45:16, Eugene Nalimov wrote:

>On June 13, 2005 at 13:23:53, Gerd Isenberg wrote:
>
>>hi, compiler experts!
>>
>>Inside a recursive search routine (not alfa/beta but my fruit fly ;-) with only
>>this-pointer and one additional integer parameter and local, msc2005 wastes 40
>>bytes (72 with other optimizations) stackspace each call. A new stack
>>defragmentation trick by ms? For 8-byte alignment those paddings seems a bit to
>>huge. Each call eats one cacheline.
>>Can someone please explain what's going on here ;-)
>
>Calling conventions. You should reserve (I believe) 32 bytes on stack for
>function you are calling. Extra 8 bytes are because stack should be 16-bytes
>align, but on function entry it is 8 bytes aligned, and we are saving even
>number of registers.

I see - usually we have some more variables on the stack - so the waste becomes
relative smaller if not zero.

Otoh there are 3 register parameters as well as a lot of remaining registers.
A recursive, very compact qsearch ...
Well may be an iterative approach for alfa/beta pays even more off.

>
>>I also wonder whether it is not possible for the compiler to keep the class
>>members inside registers during the recursive search - dumb compiler ;-)
>
>We were thinking about such optimization, but had to prune it due to some more
>urgent needs. In any case you have indirect call in your function, so the
>optimiziation would not fire even were it implemented.

The virtual const might be a hint.

Thanks,
Gerd

>
>Thanks,
>Eugene



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.