By using this site, you agree to our Privacy Policy and our Terms of Use. Close
Entroper said:
Woot, another member who understands silicon. :) I'll probably participate more in this thread after I've had some hands-on Cell programming experience (which should begin later this week). But I would like to say a few things about the development process for using SPEs. I think if you're going to write code for a platform with 8 processors, you should design your engine with parallelism in mind. Writing everything for one processor and then parallelizing it later for performance is a valid approach, and will work very well for cross-platform games. But you're not going to get the same level of performance that you would if you think in terms of parallelization from the beginning. Writing parallel code for the Cell is much harder than just starting another thread on a shared-memory SMP system, since each SPE has its own local store that must be managed separately. There may be design decisions you can make before you write a single line of code that have profound effects on the kind of performance you can get out of the Cell versus a single-CPU machine or a shared-memory machine.

I disagree ...

The general guideline of all development is that 5% of your code will be running 95% of the time; the vast majority of your code will be run very rarely and does not really need to be optimized at all (that is, unless it is running at an unreasonable rate).

I've not worked with the Cell but I have worked with DSPs and you're going to get most of the performance benefits from the Cell (that can be achieved in a cost effective way) by developing your engine in ANSI C++, creating Assembly Language versions of most of your math libraries, and then parallelizing small portions of frequently called code and running it on a SPE.

Regardless of which approach you take you will find that a major problem will be preventing the SPEs from being idle ... Even if you optimize most of your code to take advantage of the SPEs most of the time you will only be using one or two of the SPEs, and when you are using most (or all) of the SPEs one will likely be overloaded while another is starved for work.