Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-14 Thread Bruno Haible
Akim Demaille wrote: > > ‘sys' -> 'wall' > > 易 The first of these characters is described by Emacs as "Not Assigned". Time to get a newer Emacs, I guess :) > Fixed. Can I push it? Sure. Bruno

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-14 Thread Akim Demaille
> Le 14 oct. 2018 à 09:15, Bruno Haible a écrit : > > Hi Akim, > > Looks good, except for one copy mistake: >> + fprintf (fp, "%11.6f (%2d%%)\n", tv->elapsed.wall * 1e-9, sys); > ‘sys' -> 'wall' 易 Fixed. Can I push it?

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-14 Thread Bruno Haible
Hi Akim, Looks good, except for one copy mistake: > + fprintf (fp, "%11.6f (%2d%%)\n", tv->elapsed.wall * 1e-9, sys); 'sys' -> 'wall' Bruno

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-14 Thread Akim Demaille
Hi Bruno! > Le 13 oct. 2018 à 18:11, Bruno Haible a écrit : > > Hi Akim, > >> Or we filter on the percentages. > > Yes, filtering on percentages is the way to go. The user doesn't > care about contributions < 1% or < 0.5%. When people draw pie charts, > such minimal contributions are usually

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-13 Thread Bruno Haible
Hi Akim, > we measure integral types, let’s stick with them. > The less I use floating types, the happier I am. Fine with me. I must have misunderstood you. > It’s of course more precise when you have tons of utils (coreutils), > or several libraries, etc. Yes. Not every platform supports GNU

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-13 Thread Akim Demaille
> Le 13 oct. 2018 à 15:41, Bruno Haible a écrit : > > Hi Akim, > >> But it felt weird to use a double, the number of significant decimal digits >> of a float (about 7) seems enough. > > This is the line I'm talking about: > > timer->wall += stop->wall - start->wall; Sorry, I was unclear.

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-13 Thread Bruno Haible
Hi Akim, > But it felt weird to use a double, the number of significant decimal digits > of a float (about 7) seems enough. This is the line I'm talking about: timer->wall += stop->wall - start->wall; 24 bits of precision might be sufficient for timer->wall; for a measured time, the user

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-13 Thread Akim Demaille
> Le 13 oct. 2018 à 08:43, Bruno Haible a écrit : > > Hi Akim, > >>> I don’t know how 'gettime' compares against 'gethrxtime'. >> >> gethrxtime is exactly what I need, thanks! It does use gettime as >> a fallback, after having tried better (accuracy and monotony) options. > > Very nice! >

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-13 Thread Bruno Haible
Hi Akim, > > I don’t know how 'gettime' compares against 'gethrxtime'. > > gethrxtime is exactly what I need, thanks! It does use gettime as > a fallback, after having tried better (accuracy and monotony) options. Very nice! > Here is my updated proposal. Looks good, except for the mentioned

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-12 Thread Akim Demaille
> Le 12 oct. 2018 à 17:59, Bruno Haible a écrit : > > Hi Akim, > > There are three issues with this patch: > > 1) Portability. As listed in > https://www.gnu.org/software/gnulib/manual/html_node/clock_005fgettime.html > Gnulib provides no replacement for clock_gettime. So, you'll probably

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-12 Thread Bruno Haible
Hi Akim, There are three issues with this patch: 1) Portability. As listed in https://www.gnu.org/software/gnulib/manual/html_node/clock_005fgettime.html Gnulib provides no replacement for clock_gettime. So, you'll probably need gettimeofday or module 'gettime' as fallback. For clock_gettime,

Re: timevar: 3/3: use clock_gettime to get wall clock time

2018-10-11 Thread Akim Demaille
On macOS, I get an unexpected result for wall clock. Execution times (seconds) CPU user CPU systemwall clock reader 0,017 ( 4%) 0,002 (13%) 0,00 ( 0%) LALR(1) 0,002 ( 0%) 0,000 ( 1%) 0,031250 ( 6%)