From: fhcn1@ivdds6.energietechnik.uni-stuttgart.de (Claus Nagel)
Subject: DEC Fortran exp()-function ---slow---
Date: 9 Oct 1993 05:20:14 GMT [thread overview]
Message-ID: <295hme$mg5@info2.rus.uni-stuttgart.de> (raw)
Problem with exp-function in DEC-Fortran for AXP/OSF1 (DFAO)
There's a great difference in program-running-time whether using
the Fortran-function exp() or not. If explicitly give a constant
and use the "**"-Operator the runtime is extremly shorter than
using the libraryfunction.
Is anyone out there with an idea how to solve the problem without
changing all of the exp()-calls.
Any help appreciated.
environment, program and results
================================
DEC Alpha 3500 AXP, DEC OSF/1 V1.2, DEC Fortran V3.3-342 for AXP/OSF1
----- program with "manually" build the exponent --------------------
PROGRAM expman
REAL sum
r1 = 5.5
DO 10 i=1,200000
if (i .GT. 1000) r1 = 10.
sum = 2.7182818**(r1*3.0)
10 CONTINUE
STOP
END
----- program with using the exp() ----------------------------------
PROGRAM expexp
REAL sum
r1 = 5.5
DO 10 i=1,200000
if (i .GT. 1000) r1 = 10.
sum = exp(r1*3.0)
10 CONTINUE
STOP
END
----- f77-call ------------------------------------------------------
% f77 -o expman expman.f
% f77 -o expexp expexp.f
% f77 ... -v ... =>
/usr/lib/cmplrs/fort/decfort -o /tmp/forAAA026963.o expexp.f
/usr/bin/cc -o expexp -v /usr/lib/cmplrs/fort/for_main.o \
/tmp/forAAA026963.o -O4 -nocount -lUfor -lfor -lFutil -lm -lots
/usr/lib/cmplrs/cc/ld -o expexp -G 8 -g0 -O4 -call_shared -nocount \
/usr/lib/cmplrs/cc/crt0.o -count /usr/lib/cmplrs/fort/for_main.o \
/tmp/forAAA026963.o -nocount -lUfor -lfor -lFutil -lm -lots -nocount -lc
0.0u 0.0s 0:00 84% 0+0k 0+4io 0pf+0w
----- results (time mm:ss) ------------------------------------------
expman 00:10 00:10 00:05 00:05 1.0
expexp 05:06 05:17 02:38 02:35 30.6-31.6
(differences are because of other programs running, relation is the same)
#############################################################################
#postal University of Stuttgart (Germany), #
#address: Institute of Process Engineering and Power Plant Technology (IVD),#
# Claus Nagel, Pfaffenwaldring 23, D-70550 Stuttgart . #
#phone: 49 711 685 -3751, -3563, -3487 _ - |\ #
#fax: 49 711 685 3491 - | \ #
#e-mail: nagel@ivd.uni-stuttgart.de | \ */ O #
# claus.nagel@rus.uni-stuttgart.de .__|___\|_. \* #
########################################################~~~\_______/~~~######
next reply other threads:[~1993-10-09 5:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-10-09 5:20 Claus Nagel [this message]
1993-10-11 18:08 ` DEC Fortran exp()-function ---slow--- Jeff Finkelstein
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