|
 |
Warp wrote:
> Someone claimed to me once that fortran has some tricks in its sleeve with
> certain types of mathematical programming that allows it to generate much
> faster code than C can.
There's two tricks Fortran has...
1) It's OK to do single-precision math on two single-precision values.
2) It's not OK (simplified) to alias two values together and use them in the
same expression, so the compiler can assume less aliasing and keep more
stuff in registers over assignments. That makes it much easier to have a
loop doing B[I] = C[I] + A[I] and vectorize it, knowing B != A != C.
I think the later C standards improved (or tried to) on both these fields.
--
Darren New, San Diego CA, USA (PST)
"Ouch ouch ouch!"
"What's wrong? Noodles too hot?"
"No, I have Chopstick Tunnel Syndrome."
Post a reply to this message
|
 |