Sender: M DOT A DOT Bukin AT inp DOT nsk DOT su To: djgpp AT delorie DOT com Subject: Re: binutils 2.8.1 performance = slow References: <347C86AC DOT 7AAC AT seanet DOT com> From: Michael Bukin Date: 29 Nov 1997 07:59:23 +0600 In-Reply-To: "Alan M. Doerhoefer"'s message of Wed, 26 Nov 1997 20:29:32 GMT Message-Id: <20en40qx38.fsf@Sky.inp.nsk.su> Lines: 34 Precedence: bulk "Alan M. Doerhoefer" writes: > Eli Zaretskii wrote: > > > > On Tue, 25 Nov 1997, Alan M. Doerhoefer wrote: > > > > > using binutils 2.8.1 instead of 2.7 caused a remarkable > > > slowing of my program. > > > > Did you consider the possibility of different alignment of the functions > > in the version linked with 2.8.1? What processor did you run your > > program on? Different versions of binutils produce different instructions for .align directive. E.g. for the following function: int test (void) { __asm__ __volatile__ (".align 4\n\tmovl $0, %eax\n\t.align 4"); return 0; } bnu2.7: leal 0x0(%esi),%esi leal 0x0(%esi,1),%esi bnu2.8.1: leal 0x0(%esi),%esi leal 0x0(%edi,1),%edi This difference may have effects on instructions pipelining or something. I think, speed may depend on instructions near .align. Probably for other alignment quantities (or assembler directives) assemblers from different versions will produce different results too.