Lars T. Kyllingstad wrote:
Is there ever any reason to use float or double in calculations? I mean, when does one *not* want maximum precision? Will code using float or double run faster than code using real?

I understand they are needed for I/O and compatibility purposes, so I am by no means suggesting they be removed from the language. I am merely asking out of curiosity.

-Lars

Size. Since modern CPUs are memory-bandwidth limited, it's always going to be MUCH faster to use float[] instead of real[] once the array size gets too big to fit in the cache. Maybe around 2000 elements or so.

Rule of thumb: use real for temporary values, use float or double for arrays.

Reply via email to