POV-Ray : Newsgroups : povray.off-topic : you & me right now, warp : Re: you & me right now, warp Server Time
6 Sep 2024 23:24:00 EDT (-0400)
  Re: you & me right now, warp  
From: Darren New
Date: 17 Feb 2009 13:09:24
Message: <499afd54$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.