bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#44674: 28.0.50; Adding current-cpu-time for performance tests


From: Eli Zaretskii
Subject: bug#44674: 28.0.50; Adding current-cpu-time for performance tests
Date: Mon, 16 Nov 2020 12:40:13 +0200
User-agent: K-9 Mail for Android

On November 16, 2020 12:11:34 PM GMT+02:00, "Mattias Engdegård" 
<mattiase@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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]