Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Single or double precision?

rase
New Contributor I
436 Views

I am considering to change the floating point precision in my Fortran projects from single (KIND=4) to double (KIND=8) generally. I remember to have read somewhere that IA32 CPUs do all floating calculations with double precision anyway, so the overall computing time should be the same, independent of single or double precision. Is that assumption true? Has anybody done systematic timing tests concerning single and double precision?

Greetings, Wolf

0 Kudos
1 Reply
Steven_L_Intel1
Employee
436 Views
It is true that by default the actual computations are done in double precision, but there is extra memory traffic because of the larger data. I would not expect to see a big hit on performanc. For better performance, use one of the "Generate code for ..." (/Qx) options appropriate for your processor so that you use the SSE instructions. These are faster than the old x87 code.
0 Kudos
Reply