Sujet : Re: is double slower?
De : fir (at) *nospam* grunge.pl (fir)
Groupes : comp.lang.cDate : 04. Nov 2024, 15:43:30
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <c8b52cb4ea01caf441a87843285f327b3931e735@i2pn2.org>
References : 1 2
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
Chris M. Thomasson wrote:
On 11/3/2024 11:53 PM, fir wrote:
float takes less space and when you keep arrays of floats for sure float
is better (less spase and uses less memory bandwidth so i guess floats
can be as twice faster in some aspects)
>
but when you do calculations on local variables not floats do the
double is slower?
>
Ask the GPU.
why? as tu cpu im not sure as on older cpus the calculations was anyway made on double hardware (?, im not so sure) even if you passed float
to function im not sure if on assembly level yu not passed double
then after sse afair you got scalar code for floats and doubles
bbut simply i realized i dont know if double calculation on local
variables (not arrays) are in fakt anyway notable slower