From: denham@denham.zk3.dec.com (Jeffrey M. Denham)
Subject: Re: Bizarre slowness on AXP OSF/1 V3.2 system
Date: 1995/04/13 [thread overview]
Message-ID: <1995Apr13.194844.7848@decvax.dec.com> (raw)
In-Reply-To: 3lvahc$5ps@hermes.unt.edu
In article <3lvahc$5ps@hermes.unt.edu>, srt@zaphod.csci.unt.edu (Steve Tate) writes:
|>I just experienced some weird behavior, and while I managed to fix
|>my immediate problem, I'm wondering if someone could give me an
|>explanation as to what was going on.
|>
|>I wrote a very simple program that included a call to the ceil()
|>function in the math library. When I compiled it I forgot the "-lm"
|>to link with the math library.
|>
|>First weird thing: it didn't flag an error for an undefined symbol.
|>
|>Next I ran the program. It actually ran correctly, somehow finding
|>the correct ceil() function anyway! So I still didn't realize something
|>was wrong... except that it ran very, very slowly. I timed it,
|>and here's what I got:
|>
|>real 199.6
|>user 21.0
|>sys 172.7
|>
|>An absolutely huge amount of system time! On a later compile, I
|>remembered the "-lm", and with the math library linked in I got
|>the following, more reasonable, times:
|>
|>real 4.4
|>user 4.2
|>sys 0.0
|>
|>So what the hell is going on here? Does the system look in all libraries
|>for an undefined function? And it must be doing something like that for
|>*every* *single* access to the same function! That's the only possible
|>thing I can think of --- is this really what's going on? Is there
|>any reason you would *ever* want such bizarre behavior?
|
Nothing that magical. For historical reasons, there's also a version
of ceil in libc, which everyone links against. I don't have them handy,
but I believe that there's mention of this in the release notes.
--
-----------------------------------------------------------------------------
Jeff Denham, Unix Software Group, Digital Equipment Corporation
email: denham@zk3.dec.com, voice: (603) 881-0057
prev parent reply other threads:[~1995-04-13 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-04-05 4:00 Bizarre slowness on AXP OSF/1 V3.2 system Steve Tate
1995-04-13 4:00 ` Jeffrey M. Denham [this message]
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