[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] MiNTlib timing related functions behavior/performance



Eero Tamminen, 17.04.2013 19:21:42:

As localtime.o is lacking symbols, I have manually added time_fun_??
function symbols to places I saw in program disassembly to be function
entry points within it.  *_AA is the first address, *_HH is the last
one (also in localtime.c source code, I assume).

According to the graph it's not getenv that consumes much time. But in mintlib is:


localtime(timep)
const time_t * const  timep;
{
  tzset();
  return localsub(timep, 0L, &tm);
}


void
tzset(void)
{
  register const char * name;

  name = getenv("TZ");
  if (name == NULL) {
    tzsetwall();
    return;
  }
...

So every call to localtime calls getenv. That's what I meant. Maybe you could test mintlib with the tzset omitted.

--
Helmut Karlowski