Re:Understanding Quake's Fast Inverse Square Root
by russell on Sunday January 04, 2009 @01:45PM
(#419367)
IIRC (it's been a long time) the Cray 1 could do inverse, multiply, and square root in single cycle instructions. Isqrt would take two cycles as wood divide. (Back to the rocking chair.)
[ Parent
| on HN ]
Re:Understanding Quake's Fast Inverse Square Root
by marcus on Monday January 05, 2009 @09:03AM
(#420423)
Actually it didn't http://klausler.com/cray2.txt it had a command for a square root approximation and a command to iteratively get closer to the real square root.
But even if a certain computer did compute a square root (or even an approximation) in a single cycle, that would mean CPU speed was reduced by slowing down the clock to enable a more complex action to complete within the timeframe of a single cycle, and other simpler actions like adding/subtracting/moving memory we're sacrificed in its favor.
Re:Understanding Quake's Fast Inverse Square Root
by wwalker3 on Monday January 05, 2009 @03:38PM
(#421064)
Not necessarily. The square root hardware could be heavily pipelined to get each stage short enough for one cycle. This increases latency, but lets you keep a one-per-cycle throughput without slowing down the clock.