This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Linux Number Crunching: Benchmarking Compilers and Languages on ia32
- From: "Scott Robert Ladd" <scott at coyotegulch dot com>
- To: "Steven Anderson" <stevenwanderson at yahoo dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 30 Jan 2003 17:56:17 -0500
- Subject: RE: Linux Number Crunching: Benchmarking Compilers and Languages on ia32
Steven Anderson wrote
> After reviewing the code, I found that all the times
> are done using the clock system call. The problem is
> clock returns an approximation of the processor time.
> The test should use the times system call to determine
> how long each function ran.
I'm not certain which article you are referencing; the article in the
subject line uses the GNU "time" command to calculate run-times for a single
benchmark, not clock. I've had numerous debates (especially with Java folk)
over the validity of such a timing method; rather than argue, I'll be
including metrics from several timing sources in my next round of tests.
In an earlier article, I compared Intel and gcc using a number of different
benchmarks; gcc performed admirably, winning several benchmarks.
The "best" compiler is very application specific. For example, one of my own
applications implements an evolutionary algorithm for state machines. Using
finite state machines, gcc produces code that is marginally faster; when
using fuzzy state machines, Intel's code runs faster than does gcc's. Such
differences are one reason I prefer to have multiple compilers available.
I've had a lot of suggestions and "demands" from people; I've learned some
things, and also discovered several popular misconceptions about code
generation. My most recent benchmark tested 2300 combinations of switches
for generating code with gcc, giving me a better idea of how options
interact on different benchmarks. When time permits, I'll publish this
information, along with analysis of generated code, which I think will be of
value both to users and implementors of gcc.
--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Professional programming for science and engineering;
Interesting and unusual bits of very free code.