From: Bill Parquet (billp@jupiter.cse.utoledo.edu)
Date: 10/25/92


Subject: gcc optimization & benchmarks
From: billp@jupiter.cse.utoledo.edu (Bill Parquet)
Date: 25 Oct 1992 17:22:51 EST

I've compiled a copy of 'jpegsrc3.tar.Z' under dos (using borland c++ 3.1) and
under linux (using gcc 2.2.2). Since both versions use pretty much the
exact same code (except for the dos version has a fancy memory manager to
augment brain-dead dos).

I expected the linux version to be considerably faster because its working
with the 386/486 flat memory model and 32 bit arithmetic instead of playing
with far pointers and banking pages of EMS in and out as under dos. The
final results were:

    dos/bcc version 36.4 seconds (according to a timer program)
    linux/gcc ver 128 seconds (according to the `w' command)

This really suprised me. I played with the command line switches a little
bit and found one restricted the amount of memory it would use before
making temporary files. That brought the linux one down to 37 seconds.
I recompiled everything to use -O2 switch for gcc and even with the
unlimited memory switch it took in excess 2 minutes to perform its task.
Comments anybody?

-- 

billp@jupiter.cse.utoledo.edu