Xref: news-dnh.mv.net comp.os.msdos.djgpp:4566 From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: Speed,V1&V2,Pentium&486 Date: Sat, 20 Jan 1996 13:42:38 CST Organization: Rice University, Houston, Texas Lines: 25 Message-ID: <310145ae.sandmann@clio.rice.edu> References: <4domlh$ok2 AT agate DOT berkeley DOT edu> Reply-To: sandmann AT clio DOT rice DOT edu NNTP-Posting-Host: clio.rice.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp > >Note the bizzarity. DJGPP V2 is faster than V1 on the 486, but V2 is > >a lot slower than V1 on the Pentium! > > My first thought would be to look at the assembly code output by both > versions to see what the difference is. An off the top of my head guess is > that there is an alignment problem. Improperly aligned doubles will > give approximately the slowdown you see on a pentium. There are alignment problems in DJGPP. When GAS (the assembler) is built with the default configuration, it aligns code and data improperly, putting long alignments on words, and double alignments on longs. This problem has been around for a long time. Depending on the version, link order, libc, and data, you might get lucky (or unlucky - 50/50 chance) on any alignment. Then, if using 2.7.2 with V2 and 2.6.3 with V1, you introduce more comparison problems. In general, 2.7.2 generates tigher, faster code. But we disabled one of the optimization options which has been shown to occasionally generate incorrect code. So, this version of 2.7.2 might make faster code for you, or slower if the optimization option is important to your test. So, there are so many potential comparison gotchas, I could believe just about anything ... Much more info is needed to pinpoint the problem. And someone needs to look at the binutils and see why AS gets built wrong, and send a patch to the FSF.