This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [basic-improvements] Use double instead of float for timevar


Matt Austern <austern@apple.com> writes:

> As mentioned on gcc@gcc.gnu.org: timevar works by storing
> various times as 'float' values, and then subtracting them
> to get time intervals.
> 
> This is a very bad idea.  On most platforms, float only
> gives you 24 bits of precision.  Subtract two largish
> 24-bit numbers and you'll often be left with nothing but
> noise.
> 
> Here's a patch to use double instead of float, tested on
> ppc/darwin.  OK to commit to BIB?

OK.

> 	* timevar.[ch]: Use double instead of float for time stamps.
-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]