From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,684505045044b1ed,start X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,684505045044b1ed,start X-Google-Attributes: gid1164f8,public From: srt@zaphod.csci.unt.edu (Steve Tate) Subject: Bizarre slowness on AXP OSF/1 V3.2 system Date: 1995/04/05 Message-ID: <3lvahc$5ps@hermes.unt.edu>#1/1 X-Deja-AN: 100924614 distribution: world organization: University of North Texas newsgroups: comp.sys.dec,comp.unix.osf.osf1 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? -- Steve Tate --- srt@cs.unt.edu | "As often as a study is cultivated by narrow Dept. of Computer Sciences | minds, they will draw from it narrow University of North Texas | conclusions." -- John Stuart Mill, 1865. Denton, TX 76201 |