Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Is this possible?

Author: Robert Hyatt

Date: 15:11:29 09/26/02

Go up one level in this thread


On September 26, 2002 at 15:05:39, Dieter Buerssner wrote:

>On September 25, 2002 at 16:51:17, Dann Corbit wrote:
>
>>Here is what my compiler spit out (I could probably choose better flags too):
>
>When I look at the generated code, it seems, you couldn't choose better flags.
>To me, it looks essentially identical to the hand written assembly. The few
>differences (slightly other order of things, add eax, 1 instead of inc eax) I
>cannot judge. With my assembler knowledge mainly from 386 days and before, I
>would even trust the compiler more here, than myself writing this in assembler
>(I would come up with practically identical code as well). I could imagine, that
>the compiler knows something about pairing of the instructions, which I don't.
>He could also know better, about which labels should be aligned (perhaps
>dependent on specific processor switches). He can know easily, how many bytes
>each instruction needs. Perhaps using add eax, 1 makes a better alignment in the
>end, than the shorter inc eax.
>
>Gcc also produced practically the same code.
>
>Regards,
>Dieter


Don't forget that since the P6 (pentium pro) "pairing instructions" is no longer
a big issue.  The CPU does this internally by fetching a wad of instructions,
and thru dataflow analysis, figures out which can proceed in parallel without
the older (original pentium) pairing/scheduling as required back then...

The hardware guys are making some things easier for the compiler guys.  :)



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.