This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 05/10] Use clock_gettime to implement time.


On Wed, Aug 28, 2019 at 2:16 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Zack Weinberg:
>
> > Most ports were using gettimeofday to implement time, or they were
> > making a direct (v)syscall.  Unconditionally switch to using
> > clock_gettime instead.  All sysdeps implementations of time are
> > removed.
>
> I'm sorry, but this is clearly not advisable because clock_gettime is
> almost an order of magnitude slower than time.

Hmm.  How do we reconcile this with the (Linux) kernel maintainers'
stated intentions to provide only clock_gettime in the future?  We
could use CLOCK_REALTIME_COARSE when available, I suppose; can you see
whether that recovers the lost performance, or else send me your
benchmark code so I can try it?

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]