GNU bug report logs -
#44674
28.0.50; Adding current-cpu-time for performance tests
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Mon, 16 Nov 2020 01:08:01 UTC
Severity: wishlist
Tags: moreinfo
Found in version 28.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Am Mo., 16. Nov. 2020 um 11:40 Uhr schrieb Eli Zaretskii <eliz <at> gnu.org>:
>
> On November 16, 2020 12:11:34 PM GMT+02:00, "Mattias EngdegÄrd" <mattiase <at> acm.org> wrote:
> > > +The return value is a pair (CPU-TICKS . TICKS-PER-SEC).
> >
> > Perhaps not ideal to cons in a timing primitive where low overhead is
> > called for.
> > What about just returning an integer and have a different way to get
> > at TICKS-PER-SEC?
> > After all, the timer frequency is not specific to each measurement.
> >
> > Ideally the returned value should be a fixnum to minimise overhead,
> > but it may restrict the range on 32-bit platforms.
> >
> > I also agree with Phillipp's comment about clock_gettime.
>
> AFAUI, CLOCK_PROCESS_CPUTIME_ID accounts for all the threads, so might not be what we want even if it is supported, since other threads might be involved which we aren't interested in (e.g., GTK threads).
clock (on GNU/Linux) is a thin wrapper around
CLOCK_PROCESS_CPUTIME_ID, see
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/clock.c;hb=aac0f62c47beee5b546bacc330acc2dd21cda0dc.
This bug report was last modified 3 years and 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.