Mail Archives: djgpp/1996/01/21/05:10:09
> >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.
- Raw text -