lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Dec 3, 2012 at 2:50 PM, Martin Krpan <wtxnh-lua@yahoo.com.au> wrote:
> On Sat, Dec 01, 2012 at 02:12:06PM -0800, M. Edward (Ed) Borasky wrote:
>> C was designed for writing systems programs - operating systems and
>> compilers. It took about ten years for the compilers to get good
>> enough for it to be competitive with FORTRAN for number crunching.
>
> I have read many times that FORTRAN is better Than C for number
> crunching buy I do not know WHY?
>
> Obviously I am missing some knowledge therefore can somebody please
> educate me as I do not thing that FORTRAN can calculate faster than C
> statement like
> c = a + b
> or even
> c = sqrt(exp(a, 2), exp(b, 2))
> so what is that makes the difference...?
>
> Martin
>

Long story short, it's actually not. Once upon a time, it was, when C
was a systems programming language and FORTRAN was explicitly created
for mathematics. Now, not so much -- with the GNU tools, both
languages compile down to essentially the same thing and are
essentially equivalent in performance.

/s/ Adam