Research & Development

SPU Ninja Homework #3

Posted on Aug 15, 2007, 12:00 pm
 
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
 
+2

2 COMMENTS

SHARE
1 PERSON LIKES THIS     LIKE     COMMENT
Cavorite
Cavorite Oct 23, 2009, 2:23 am
This is for Ninjas only!
emoon
emoon Oct 24, 2009, 3:49 pm
The SPU Ninja training class seems really cool. If you have some more to post it would be great :)

LEAVE A COMMENT



You must be logged in to add a comment
LATEST ARTICLES