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

Geoff Keating geoffk@geoffk.org
Fri Nov 8 13:56:00 GMT 2002


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>



More information about the Gcc-patches mailing list