emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimized gcc 4.3.0 build on Windows returns 0 secs for all time val


From: Juanma Barranquero
Subject: Re: Optimized gcc 4.3.0 build on Windows returns 0 secs for all time values of system-process-attributes
Date: Sat, 3 Jan 2009 17:00:23 +0100

On Sat, Jan 3, 2009 at 16:33, Eli Zaretskii <address@hidden> wrote:

> That's a bug in GCC, I'd say: all these variables are in registers, so
> it probably reuses one of the FP registers incorrectly.

Yes, definitely a compiler bug.

> What happens if you transpose these two lines:
>
>  stime_usec = fmodl (tem1, 1000000.0L);
>  stime_sec = tem1 * 0.000001L;
>
> (and similarly for other ?time_* qualities)? does the code work again
> then?

It works; at least, proced shows meaningful results:

  Juanma 1006 Ninguno  513  180  332 0     8 100.0  3.7      12  27356
 38252  37052  13:36 00:01 00:02 00:16 14247-15:50:47 explorer.exe
  Juanma 1006 Ninguno  513 2600 3596 0     8  12.6  0.3       4  10328
  3252  10855  12:11 00:01 00:04 00:08 14247-15:50:47 tcmd.exe
  Juanma 1006 Ninguno  513 1760 2600  1    4  55.6  1.2       3   9964
 12512  13799  12:12 00:01 00:09 01:08 14247-15:50:47 tcc.exe
  Juanma 1006 Ninguno  513 2680 2600  1    4 100.0  1.1       3   9036
 11512  23211  12:12 00:01 00:11 01:08 14247-15:50:47 tcc.exe
  Juanma 1006 Ninguno  513 4080 2600  1    4  52.0  1.1       3   9800
 11888   6821  12:12 00:01 00:08 01:06 14247-15:50:46 tcc.exe
  Juanma 1006 Ninguno  513 2888 1716 0     8 100.0  1.9       3  17092
 19996   8667  16:50 00:00 00:01 00:01 14247-15:50:47 emacs.exe

> (Note that I reuse tem1 and tem2 twice in the code, so even if
> transposition works, something else will need to be done to make all
> of the function work correctly.)

I suppose it can be made to work by adding additional temporary
variables, but at this point, I'm not sure it wouldn't be just easier
and cleaner to switch to 64-bit integer arithmetic.

    Juanma




reply via email to

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