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
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
On November 16, 2020 3:07:35 AM GMT+02:00, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
> Package: Emacs
> Version: 28.0.50
>
>
> I tried to write a test for the performance problem seen in bug#41029,
> but found it very difficult to make it work half-reliably because we
> only have access to wall-clock time from Elisp.
>
> So I suggest we add a new primitive `current-cpu-time` with which
> those
> tests seem to be at least somewhat doable.
>
> See my current patch below which includes a test for that
> performance bug. It clearly requires adding w32 support (or
> fetching more clock functionality from gnulib) but I don't know how to
> do that.
AFAIU, using 'clock' here is not the best idea, as there are caveats wrt to calling 'system', and the origin of the returned value is not well defined to be portable.
I suggest to use 'times' instead. For w32, we could easily implement it, as we already have that functionality for 'getloadavg'.
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.