From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,684505045044b1ed X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,684505045044b1ed X-Google-Attributes: gidfee84,public From: denham@denham.zk3.dec.com (Jeffrey M. Denham) Subject: Re: Bizarre slowness on AXP OSF/1 V3.2 system Date: 1995/04/13 Message-ID: <1995Apr13.194844.7848@decvax.dec.com>#1/1 X-Deja-AN: 100353086 sender: usenet@decvax.dec.com (Usenet News System) references: <3lvahc$5ps@hermes.unt.edu> organization: Digital Equipment Corporation reply-to: denham@zk3.dec.com (Jeffrey M. Denham) newsgroups: comp.sys.dec,comp.unix.osf.osf1 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