View Single Post
Old 08-21-2004, 06:55 AM   #8
JimO'Connor
Mac Development
 
JimO'Connor's Avatar
 
Join Date: Jul 2002

Location: Kenai, Alaska
Posts: 678
Re: Re: Aha! I understand

Originally posted by AKcrab
If you look at the wire frames (press W) while running each of the simulations, I think it will be pretty obvious why the Goldfish takes more power.

The complexity of the goldfish mesh is amazing.
AKcrab has this right. Goldfish is slower primarily because there is just more data to push around. When the "Vertex Array Range" check box is hooked up to something then the number of times the data is pushed around will be reduced and both MA and GA will receive a speed boost (size yet to be determined, but I expect it to be larger for GA than MA because GA has so much more data). I won't promise when this will happen, but I have every intention of making it happen.

There is one algorithmic black hole which GA has which MA doesn't have which has so far been resistant to optimization because it depends on accessing a large table and has lots of if's in it. The large table means a lot of memory access (bad thing) and the if's give the instruction pipe trouble. An old optimization trick was to store commonly used values (such as sin, cos, tan, sqrt) in a table rather than re-compute them. This is now probably a bad idea as recalcing them is often more efficient than looking them up because of the speed disparity between the CPU and memory (unless the entire table can be kept in cache and not shoved out).

G4 optimization (AltiVec) has so far not been done because it requires us to pad our data by 1/3 in order to get proper alignment, which then increases the amount of data we have to push around by 1/3, which then costs far more than the computational savings. Since we aren't primarily computationally bound, but memory bound, this is a bad thing. In a single aquarium, notice that turning on and off "mutiple CPUs" doesn't have a HUGE effect. Enough to be worthwhile, but not 30%. After we go version 1.0 I expect to take another look at AltiVec. That is the neat thing about having a line of similar products. Each one gives us a chance to improve on the previous one, and then the improvements get rolled back to the first product (eventually).
Jim O'Connor
Order N Development
JimO'Connor is offline   Reply With Quote