Date: Tue, 23 Sep 1997 19:31:29 +0800 (GMT) From: Orlando Andico To: firewind cc: djgpp AT delorie DOT com Subject: DJGPP and optimized code In-Reply-To: <604rks$fj2@sjx-ixn9.ix.netcom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 22 Sep 1997, firewind wrote: .. > DJGPP does not and will -never- add things not already present in the stock > gcc. .. > How about we fart in their general direction anyway? If you think MSVC is > great, by all means, switch. Personally, I'll stick with gcc. I agree that in general, sticking with gcc is smarter. But will DJGPP _ever_ adopt anything from egcs? I know it's experimental, but the performance improvements are quite impressive (I've attached a simple benchmark that I've made). There is a DJGPP binary on www.goof.com; is this ever going to be part of the standard distribution? anyway, below are the results of the CPU-intensive test I did. --- Test procedure: The program used was the publicly available ISO MPEG layer 1, 2, and 3 decoder (CD 11172-5 of April 1994) with modifications by Fraunhofer-IIS (version 4.1). A 32-kbps, 32kHz single-channel MPEG-1 layer II file was decoded, and the wave output dumped to /dev/null. Time consumed by this procedure was measured with the `time' command. All tests were performed on an unloaded Red Hat Linux 4.2 system (kernel 2.0.30, Pentium-optimized) with a 100-MHz Pentium processor and 24MB of core. The test is not I/O intensive because the MPEG source file is small (<1MB) and output was directed to the null device. Both 486- and Pentium-optimized binaries were dynamic ELF executables, and used the system's 486-optimized libc and libm. So it is possible to get even better improvements by recompiling the libraries with Pentium optimizations. In summary, egcs had the following speed improvements over gcc: user +37.7% system +11.9% elapsed +37.3% --- gcc version 2.7.2.1 CFLAGS="-m486 -ffast-math -fomit-frame-pointer -O2" time ./decode486 -A /opt/share/archive/mpeg2/pieces-of-you.mp2 /dev/null > Avg slots/frame = 144.000; b/smp = 1.00; br = 32.000 kbps > Decoding of "/opt/share/archive/mpeg2/pieces-of-you.mp2" is finished > The decoded PCM output file name is "/dev/null" > "/dev/null" has been written with AIFF header information > 129.00user 0.89system 2:10.00elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k > 0inputs+0outputs (93major+31minor)pagefaults 0swaps gcc version egcs-2.90.06p 970907 (gcc2-970802 experimental) CFLAGS="-mpentium -ffast-math -fomit-frame-pointer -O6" time ./decode586 -A /opt/share/archive/mpeg2/pieces-of-you.mp2 /dev/null > Avg slots/frame = 144.000; b/smp = 1.00; br = 32.000 kbps > Decoding of "/opt/share/archive/mpeg2/pieces-of-you.mp2" is finished > The decoded PCM output file name is "/dev/null" > "/dev/null" has been written with AIFF header information > 93.70user 0.75system 1:34.67elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k > 0inputs+0outputs (102major+32minor)pagefaults 0swaps