From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199604041530.IAA18120@koala.azstarnet.com> Date: Thu, 4 Apr 1996 08:30:37 -0700 From: David Mosberger-Tang Subject: Re: Help: lib function localtime extremely slow >>>>> On Thu, 4 Apr 1996 09:00:25 -0600 (CST), (cosc1) 95h02740 said: Yansong> I found once that localtime takes about 28 seconds CPU time Yansong> to run on a 166MHz UDB running redhat Linux. What on earth Yansong> does the localtime do? sometimes it runs fast, but the Yansong> time needed is about between 1-30 seconds. I'm not familiar with the locatime() implementation in the old libc, but the GNU libc had a function that used an iterative algorithm which took forever when passed 64 bit values (values that don't fit into 32 bits). That's fixed now in glibc. I seem to remember Bob Manson mentioning problems similar to what I saw in glibc when he originally started the libc work. So it wouldn't surprise me if the old libc uses the same broken algorithm. In any case, if localtime() takes 28 seconds on a 32 bit value, there definitively is something broken (in case that wasn't clear... :-). --david