Monday November 23 2009
Sony Playstation 3
Forum Threads
Story Header

Sony Playstation 3: End all arguments: PS3 vs 360

By: Michael Perry - Published November 13, 2006 at 12:38 AM EST - Writer Archive

A bit of review

  • #1 Both consoles are using in-order execution CPUs that are half the speed of out-of-order execution processors when it comes to running most game code, especially the more troublesome type which contains branches, loops and pointers.
  • #2 The very code they’re hoping to get improved performance out of isn't the type to lend itself so easily to multi-threading… to say it's hard would be the understatement of the century.

    Here is a bit of what John Carmack, technical director of id Software, has to say about this.

    “I do somewhat question whether we might have been better off this generation having an out-of-order main processor, rather than splitting it all up into these multi-processor systems.”

    “It’s probably a good thing for us to be getting with the program now, the first generation of titles coming out for both platforms will not be anywhere close to taking full advantage of all this extra capability, but maybe by the time the next generation of consoles roll around, the developers will be a little bit more comfortable with all of this and be able to get more benefit out of it.”

    But it’s not a problem that I actually think is going to have a solution. I think it’s going to stay hard, I don’t think there’s going to be a silver bullet for parallel programming. There have been a lot of very smart people, researchers and so on, that have been working this problem for 20 years, and it doesn’t really look any more promising than it was before.”

    Everyone should be aware that these processors while powerful and a leap over what the current generation consoles had, they aren’t the second coming they were marketed to be and what drives this point home even further is the fact that Multi-threaded programming on these CPUs will definitely not be achieved at the snap of a finger; the developers have their work cut out for them.

    How is one CPU better than another?

    GFLOPS is something that gets thrown around a lot, but it should be clear that the peak theoretical GFLOP numbers for both these CPUs are:

  • 115GFLOPS Theoretical Peak Performance for 360 CPU
  • 218GFLOPS Theoretical Peak Performance for PS3 CPU.

    These CPU theories will not be achieved in real world performance. What IBM did when testing for theoretical peaks on both CPUs can't really be considered as representative of how the processors would actually perform in real world situations, because of the type of testing done is too controlled. It’s a much too perfect of an environment and game development is going to involve an unforgiving environment that doesn’t cater so well to the perfect environment the CPUs were tested under.

    The GFLOP numbers for the PS3 were calculated based on 8 running SPE, so the fact that the PS3 uses only 6 SPE for game applications lowers the peak theoretical even further, as majority of the floating point work on the PS3’s CPU is done via the SPE. Each SPE has a peak theoretical of 25.6GFLOPS. So the total peak theoretical performance for all 6 SPE would be 153.6GFLOPS, but why is that number also not achievable?

    In IBM’s controlled testing environment, their optimized code on 8 SPE only yielded a performance number of 155.5GFLOPS. If it took 8 SPE to achieve that, no way 6 will be able to and that testing was done in a fashion that didn’t model all the complexities of DMA and the memory system. Using a 1Kx1K matrix and 8 SPE they were able to achieve 73.4GFLOPS, but the PS3 uses 6 SPE for games and these tests were done in controlled environments. So going on this information, even 73.4GFLOPS is seemingly out of reach, showing us that Sony didn’t necessarily lie about the cell’s performance as they made clear the 218GFLOPS was “theoretical.” But just like Microsoft they definitely wanted you to misinterpret these numbers into believing they were achievable.

    Even while taking all of this into consideration, the CPUs can’t reach those crazy performance numbers; the PS3’s cell still comfortably comes out on top in terms of overall floating point capability, but it should be known that the available power on the PS3’s cell will be significantly more difficult to harness than the available power on the 360’s CPU.

    It’s also worth mentioning that even the PS2 CPU had more than twice the GFLOPS of the original Xbox’s CPU, but it didn’t necessarily lead it to being the performance winner. This time around, while the cell has the GFLOPS advantage, its advantage isn’t quite as big as the PS2 CPU had on the Xbox. This teaches us that there is more than one meter of real world performance.

    The PS3’s cell processor has 1 Power PC core similar to that of the 3 Power PC cores sustaining the 360’s 3 core design (without the vmx-128 enhancements available on each of the 360’s cores) and 7 SPE (synergistic processing element). The 8th is disabled to improve yields. One of the SPE is used to run the PS3’s operating system while the other 6 are available for games. The reason the PS3’s CPU will be significantly more difficult to program for is because the CPU is asymmetric, unlike the 360’s CPU. Because of the PS3 CPU only having 1 PPE compared to the 360’s 3, all game control, scripting, AI and other branch intensive code will need to be crammed into two threads which share a very narrow execution core and no instruction window. The cell’s SPE will be unable to help out here as they are not as robust; hence, not fit for accelerating things such as AI, as it’s fairly branch intensive and the SPE lacks branch prediction capability entirely.

    I’m sure people remember from the section detailing how the 360 and PS3’s processors are less robust compared to processors we use on our desktop computers and the consequences of being in order execution. Well the PS3’s SPE are further stripped down than even the Power PC Cores and, as a result, isn’t as capable of handling as many different types of code like the 1 Power PC Core available on the PS3’s cell or the 3 Power PC Cores available on the 360’s CPU. The problem with being asymmetric is when you program for the Power PC Core on the PS3 CPU, the method of programming you used to get the most out of that Power PC core is no longer effective when breaking off tasks for the SPE to work on. Going from the PPE to the SPE on the PS3 requires a different compiler and a different set of tools.

    When you come to the realization that the key to making up for the CPU is in-order execution is the rather complicated parallel programming, you realize that the CPU being asymmetric and having just a single PPE makes something that was already extremely difficult even more difficult. So a developer’s job is harder when you factor in that the PS3 has a 512KB L2 cache which is half the size of the 360 CPU’s 1MB L2 cache… that single PPE the PS3 CPU has isn’t receiving much help with branches in the cache department.

    Microsoft made a better decision from the perspective of the developer; it's still difficult, but much easier compared to working with the Cell architecture. The 360’s CPU isn’t asymmetric like the PS3’s cell and has 3 PPE as opposed to 1, but all 3 are robust enough to help handle the type of code only the PS3’s single PPE is capable of handling. When Microsoft says they have three times the general purpose processing power this is what they mean. Based on the simple fact that the 360 has 3 Power PC cores to the PS3’s 1, more processing power can be dedicated to helping with things such as game control AI, scripting and other types of branch intensive code.

    From the perspective of a developer the 360’s CPU’s biggest advantage is that all 3 of the 360’s cores are identical, all run from the same memory pool and they’re synchronized, in addition to being cache coherent. You can just create an extra thread right in your program and have it do some work. This allows the developer to create very nice structures so if you know how to get the best possible performance out of one core you know how to get the best possible performance out of all 3 because they operate in perfect synch.

    Each core on the 360’s processor is capable of performing 2 threads each (Think of it as similar to hyper threading), so the 360’s CPU is capable of handling 6 simultaneous running threads at once. This brings me to a very important advantage for the PS3’s Cell CPU, its concurrency. While the 360 CPU may be able to handle 6 processor threads simultaneously it still only has 3 physical CPU cores so every 2 threads must share processing power on a single core. Whereas with the PS3, it has 1 PPE and 6 SPE for games, which are like extra physical processors). If each of the PS3’s 6 SPE used for games are working on a specific task such as collision, cloth physics, animation, water surface simulation or particles, they wouldn’t need to worry about processing power being taken away from another part of the game because the SPE don’t share processing power.

    The only cause for concern would be the 512KB L2 cache being shared by 7 simultaneous running SPE and a PPE, but that’s what developers are for; they work around things like this. In practice, this should allow PS3 games to potentially have more things going on at once than 360 games. Ignoring the difficulties of programming for the PS3 CPU, it should be known that the PS3’s CPU is very good when it comes to vertex-related operations because the PS3’s CPU handles graphics code better than the 360’s CPU. It is also possible that through good parallelism of physics code on the SPE that physics code could also run better on the PS3 CPU due to the concurrency advantage.

    The 360 CPU however, due to its 3 symmetric General Purpose Cores, is not only much easier to program for than the cell, but having 3 PPE capable of handling things such as AI also means the 360’s CPU will be the better of the 2 CPUs when it comes to AI code. Either way we can look forward to great things from both CPUs in the future.

    Before I end off, I’d like to point out a game that in my opinion, from a technical standpoint, is one the most brilliant uses of the PS3’s CPU. All things considered, such as in-order execution and the other complications of the architecture, Heavenly Sword is quite the standout in nearly every regard: incredible combat animations, awesome group enemy AI, and great physics. At the very least this is what I gathered from seeing videos of the E3 demo; it’s a reminder that regardless of the challenges, there are developers that are up to the challenge and its only going to get better with time.

  • Continued (4/11) »

    User Comments

    - 150 Comments

    » This story has had 150 comments posted since November 13, 2006 at 12:38 AM EST.

    Latest Poll