Page Not Found

We could not find the page you have requested.
Insomniac Games :: R&D
Insomniac Games - Page Not Found
  • Games
  • Careers
  • Community
  • Blogcast
  • About
  • Join the Insomniac Community Now
    • Already a Member? Login

Page Not Found

We could not find the page you have requested.

SPU Ninja Homework #3

8/15/07 - 7:00 PST - Posted by Mike Acton, Engine Director

Here at Insomniac we’ve started an SPU training class which we call SPU Ninja Training. It’s an optional class open to our programmers. The main idea is that we introduce some problem to solve on the SPU and programmers will spend the next week or two working out a solution in their spare time. Each class we try to cover the details of different solutions and offer suggestions for better implementations.

For homework #3, the problem was to take this production code, originally written by Mike Day (engine programmer) about 4 years ago and optimize it for the SPU. The source: distance_la_original.c

Why don’t you try out the problem yourself?

Mark Lee, one of our engine programmers who has specialized in graphics work, turned in this result: distance_la_mlee.c. The difference between the original and Mark’s version was pretty impressive:

(Based on running 10000 iterations using identical randomly generated for each case):
Original: total time = 21464464, average per call = 2146 cycles
New: total time = 3884055, average per call = 388 cycles

You might also want to check out Reddy Sambavaram’s version: distance_la_rsambavaram.cpp

Original File

Mark Lee's file

Reddy Sambavaram's file