Mail Archives: djgpp-workers/2002/10/17/01:47:18
On Wed, 16 Oct 2002, Leonid Pauzner wrote:
> > Can you show a design for such caching? Specifically, how do you know
> > when to invalidate the cached value(s)?
>
> I mean a caching within an hour directly inside mktime(),
This only works for normalized `struct tm' arguments to `mktime', and
doesn't test the timezone offset (so could produce erroneous results).
Anyway, what applications do you think will benefit from this? If you
are thinking about those which call `stat' (like `ls'), what speedup of
`stat' will this change get us (I'm not sure mktime takes up a
significant portion of `stat's time)?
As for `gettimeofday', what kind of applications calls it so massively as
to justify caching? Isn't it better to move this caching into
`gettimeofday' itself?
- Raw text -