Re: Is Fortran faster than C?
> I guess Intel Visual Fortran or other Fortran has natural support for the
> quadruple precision.
Intel (and a few other brands) of Fortran support quad without
additional add-ons, as a standard Fortran data type, even on platforms
where it is not a hardware supported data type. On a few platforms, such
as Itanium and Power, there is sufficient hardware support for quad
precision that it can be carried out in less than 3 times the time
required for double, for applications which don't spend much time on
divide or transcendentals. On Itanium, this is done under reasonable
compliance with IEEE standard for IEEE 128-bit floating point. On more
popular platforms like x86-64, the loss of opportunity for vectorization
makes the penalty for quad precision more like an order of magnitude.
It is still possible to show reasonable compliance with IEEE standard.
> Now, speed if critical for my application. If somebody tells me that
> Fortran's support of Quadruple precision is about 10% faster than any other
> quadruple solution in any other libraries in C/C++, then I am going to turn
> to Fortran.
> If the consensus is that Fortran for numerical calculations is only 5%
> faster than C/C++, then I won't bother turn to Fortran.
When you use software floating point, in principle, any differences
among languages become less important, compared to the quality of the
floating point emulation. While some C/C++ compilers include some
hidden support for quad precision, I don't know of any where it's a
vendor supported data type. So it will be difficult to make a
meaningful comparison such as you request.
> I have some computation and simulation which need quadruple precision. I
> mean, the double precision is not enough, while high precision such as 1000
> digits is not needed, and that's too slow. I guess quadruple precision
> exactly fits my problem and should be much faster than double precision.
It's difficult to guess what you are getting at here. Certainly, if the
quad precision of several Fortran compilers satisfies your needs, it
should be more convenient and possibly more efficient than multiple
precision libraries such as GMP, particularly if you are restricting
your usage to Windows.
> Could anybody tell me if MS Visual C++, or Intel C, Intel Fortran have
> already got quadruple precision in them and they are fully supported on
> Intel based cpus? I guess Intel Fortran has quadruple precision, but since I
> prefer C/C++ so my first choices are within C/C++ languages.
> Moreover, do GSL, Intel MKL, and IMSL etc. have got quadruple precision
> support? I only need +, -, *, /, exp, and log.
Up to now, I thought you were thinking along the lines of GMP. MKL does
incorporate a GMP work-alike.
> Moreover, are there popular quadruple precision packages? Please recommend
> the fastest one. I am really in huge need of speed.
As already stated, GMP and compatible packages seem to be the closest
match to your ideas in terms of add-on libraries. Of course, they
present a significant performance and coding difficulty penalty,
compared to native hardware supported floating point.
Your questions aren't precise enough to admit of meaningful answers.
There is plenty of preliminary research you could do quickly to improve