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 19:13:05 +0200

> From: Mattias EngdegÄrd <mattiase@acm.org>
> Date: Mon, 16 Nov 2020 11:11:34 +0100
> Cc: Eli Zaretskii <eliz@gnu.org>, 44674@debbugs.gnu.org,
>         Philipp Stephani <p.stephani2@gmail.com>
> 
> > +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?

Why not just return a float in seconds instead?  Do we envision any
application that could be interested in (non-portable) ticks?

> Ideally the returned value should be a fixnum to minimise overhead, but it 
> may restrict the range on 32-bit platforms.

If it must be a fixnum, then it will need to be in nanoseconds, which
would limit its applicability for measuring long intervals.





reply via email to

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