From: trey@mps.ohio-state.edu (James B. White III)
Subject: DEC f77 vs. f90 vs. cc
Date: 1995/09/25 [thread overview]
Message-ID: <trey-2509951245160001@phyntg4.mps.ohio-state.edu> (raw)
I wrote and executed some simple test programs to compare the
DEC AXP FORTRAN 77, Fortran 90, and C compilers. Here are my
results for those simple codes, along with Linpack and Livermore
Loops benchmarks.
Programs were run on an AlphaServer 2100 4/233 (one processor)
under DEC OSF/1 V3.2B.
Fortran matrix codes are SAXPY form, while C codes are dot-product form.
The codes use the optimized BLAS routines from the Digital
Extended Math Library.
Compile options:
f77 -fast -O5 ... -ldxml
f90 -fast -O5 ... -ldxml
cc -D_INTRINSICS -D_INLINE_INTRINSICS -fp-reorder -O4 ... -ldxml
Measurements are in MFLOPS (bigger is better).
f77 f90 cc
Vector Addition (double)
DO loop 27.45 16.29 23.00
BLAS routine (DAXPY) 29.42 23.14 29.68
Array syntax ***** 28.93 *****
FORALL loop ***** 16.46 *****
Dot product (double)
DO loop 21.86 16.31 21.49
BLAS routine (DDOT) 22.84 22.05 22.15
SUM w/array notation ***** 16.21 *****
DOT_PRODUCT ***** 16.21 *****
Matrix-vector multiplication (double)
DO loop (no unrolling) 44.69 42.86 23.34
2-way unrolling 55.91 47.96 35.27
4-way unrolling 70.91 52.09 46.54
8-way unrolling 60.03 56.24 35.75
BLAS routine (DGEMV) 65.00 64.35 56.68
Array syntax ***** 25.97 *****
MATMUL ***** 23.70 *****
LINPACK Benchmark
Single precision 70.36 63.96 20.63
Double precision 50.25 43.97 25.22
Livermore Loops Benchmark
Single precision max 178.04 114.23 *****
Single precision avg 51.40 43.60 *****
Single precision min 10.59 10.06 *****
Double precision max 144.72 109.75 *****
Double precision avg 42.05 37.46 *****
Double precision min 9.71 11.36 *****
*** END OF TESTS ***
Some of the results for f90 were confusing and disappointing.
For example, why aren't the intrinsic functions MATMUL and DOT_PRODUCT
almost as fast as the BLAS routines? The optimized BLAS routines were
already around. Why didn't DEC just code MATMUL and DOT_PRODUCT as
wrappers for _DOT and _GEMV?
--
James B. White III (Trey)
Theoretical Nuclear Physics Graduate Student
The Ohio State University
trey@mps.ohio-state.edu
reply other threads:[~1995-09-25 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox