Date: Fri, 10 Mar 2000 12:30:47 -0500 (EST) Message-Id: <200003101730.MAA22032@indy.delorie.com> From: Eli Zaretskii To: djgpp AT delorie DOT com CC: buers AT gmx DOT de (Dieter Buerssner) In-reply-to: <8a65uu$39fkt$1@fu-berlin.de> (buers@gmx.de) Subject: Re: [long] gcc performance and possible bug References: <8a65uu$39fkt$1 AT fu-berlin DOT de> Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > To exclude, that there may be a (hardware) problem with my system: > Could please anybody try, to reproduce my results by compiling > the following program with > > gcc -O2 mwc32tst.c > > and running a.exe, then uncomment the const close to the end > of the listing and recompile and rerun. Please post or mail your > results, maybe including your processor and versions of gcc and > binutils (I have AMD K6-2, tried with various versions of gcc and > binutils, including gcc 2.95.2 and binutils 2.9.5). I did this on two machines: a P-166 running DOS 5.0 and a 400-MHz Celeron running Windows 98, with two different versions of GCC. Here are the results: P166/gcc 2.7.2.1 P166/gcc 2.95.2 C400/2.7.2.1 C400/2.95.2 non-const 0.18053 0.06059 0.05445 0.01515 const 0.30990 0.17480 0.05486 0.01556 The version of Binutils in both case was 2.9.1. I'm not sure what does this mean, but it looks like alignment-related problems. Otherwise, I cannot explain how come the same executable runs with the same speed on one machine, but not on another. There's no 1:10 speed difference, which seems to confirm what Salvador said: you are seeing some K-6-specific effect.