|
From: Wolfgang W. <ww...@gm...> - 2005-05-26 15:11:23
|
On Thursday 26 May 2005 06:19, Andrew Clinton wrote:
> I've updated the tests
> - Changed constants single precision (neither float or double seems to
> introduce any casts in the assembly, now)
>
I made some tests and it seems that gcc-4.1.0 20050526 ("today's version")
does not make any difference between 0.5 and 0.5f as fp constants.
While earier versions of gcc apparently automatically widened
float -> double while doing down-conversion double->float at run time,
current (development) versions make no difference.
Especially, I verified that the following snippets of test-speed.cc compile
into binary equivalent code:
v[0]=res; v[1]=res-0.1f; v[2]=res-0.2f;
v[0]=res; v[1]=res-0.1; v[2]=res-0.2;
v[0]=res; v[1]=res-(T)0.1; v[2]=res-(T)0.2;
Wolfgang
|