Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

Performance penalty for double precision?

Intel_C_Intel
Employee
484 Views
Is there, in general, any performance penalty when using double precision instead of single precision? I thought I had seen some documentation that double precision calculations might actually be faster, but now I can't find it.

Thanks,

Andy
0 Kudos
3 Replies
james1
Beginner
484 Views
The answer is very much dependent upon hardware platform. Some platforms may have to "emulate" double precision, although nothing recent. Other platforms prefer dealing with 64 bit entities rather than 32 bit entities and on those system computations are actually optimized for double precision work. Of course if you are storing a great number of floating point numbers then obviously the memory requirements are doubled, how that is included in performance is very much application dependent.

James
0 Kudos
Intel_C_Intel
Employee
484 Views
I was interested primarily in IA-32 systems.
0 Kudos
TimP
Honored Contributor III
484 Views
If you are using SSE code (IFL -QxK and the like), double precision divide and sqrt()take more cycles than single. Other than that, the main difference would be from cache and (if you read or write large files) disk buffering. The difference would vary from negligible to large depending on your application. I assume you aren't using the free Windows compilers, where you must go out of your way to get aligned storage of doubles, and that you heed your compiler's warnings against forcing un-aligned storage.
0 Kudos
Reply