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: Philipp Stephani
Subject: bug#44674: 28.0.50; Adding current-cpu-time for performance tests
Date: Mon, 16 Nov 2020 19:32:35 +0100

Am Mo., 16. Nov. 2020 um 18:28 Uhr schrieb Eli Zaretskii <eliz@gnu.org>:
>
> > From: Stefan Monnier <monnier@iro.umontreal.ca>
> > Cc: Eli Zaretskii <eliz@gnu.org>,  44674@debbugs.gnu.org,  Philipp Stephani
> >  <p.stephani2@gmail.com>
> > Date: Mon, 16 Nov 2020 10:27:29 -0500
> >
> > > 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.
> >
> > What do you mean by "origin" and by "calling 'system'"?
>
> Quoting https://pubs.opengroup.org/onlinepubs/9699919799/:
>
>           The clock() function shall return the implementation's best
>           approximation to the processor time used by the process
>           since the beginning of an implementation-defined era
>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>           related only to the process invocation.
>
> How do you write portable Lisp code that returns consistent results
> based on such shaky foundations?

For non-walltime clocks, only the difference between two measurements
is meaningful.





reply via email to

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