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: Stefan Monnier
Subject: bug#44674: 28.0.50; Adding current-cpu-time for performance tests
Date: Mon, 16 Nov 2020 14:07:41 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> Also since I'm not familiar with any of those interfaces, I'd welcome
>> it if someone else could do that if they're interested.
> I wouldn't mind doing it, if there's general agreement that it's worth having.
> But it would really just be:
> 1. clock_gettime(CLOCK_MONOTONIC_ID)
> 2. check for errors
> 3. make_lisp_time

CLOCK_MONOTONIC wouldn't satisfy my needs, because it makes the duration
of execution of a piece of code too depend on OS's scheduling choices.\
In my use case I need to run two chunks of code and make sure their
run-time is not "wildly" different, but with wall-clock time (and
CLOCK_MONOTONIC is close enough to wallclock to suffer from the same
problem) any context switch in the middle of one of the two runs can
cause such "wildly" different results, including make the slow code
appear to be much faster than the fast one.


        Stefan






reply via email to

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