Can my AMD Athlon 2000+ outgun the next gen consoles?
It looks like the developers working on games for the PlayStation 3 and the XBOX 360 are having some difficulty with the architecture. According to some reports, the developers have had a hard time getting more than double the performance of the original XBOX hardware, a benchmark that is handily trounced by my three year old Athlon 2000+ machine when running games. The problem comes down to both system's reliance on developer ability as opposed to correcting their mistakes with the hardware.
Threading is only one of the problems, it is difficult to write complicated code that makes proper use of threading in modern CPUs, but the problems really aren't with the developers, but rather with the compilers and the languages that the developers have to choose from. Ideally the compiler should be able to determine which code would benefit from running in its own thread and change the code accordingly at compile time. The problem with having the compiler do this is that it takes an inordinate amount of profiling and an intimate knowledge of the goal of the code to make such a determination.
Programmers are complaining that the processors just don't perform the way they had expected them to, I would argue that they can perform well, but developers haven't had the tools, and the developers probably aren't thinking broadly enough. The problem with the current way of thinking is that there is some schedule to the operation of code, that the processing order is controlled by the main method. The problem with this procedural thought process and threading is that it becomes necessary to have threads and objects that have to wait for other objects and threads to complete their work. Most people who have had to optimize threaded code have devised clever systems of listener objects to determine when a method has finished on another thread, which is as I said clever, however it leads to overhead that probably should be managed at the operating system level. There is another solution, one that moves object oriented programming to the services oriented programming and takes development to another level of abstraction.
Now, in my ideal idea of how service based code should work, objects should all have built in message listeners that operate at the OS level, and should all be initialized at the same time. The developer should have the option of having the initalizer send a preset message to a service or object. This message would have basic instructions telling the object to turn on and perform some task, which would send messages out to other objects. This would help the compiler decide which code to thread in that each service object could run in its own thread. It wouldn't matter what the sequence was because the object wouldn't do anything until it had received a message. In this scenario, the compiler could decide which core should handle the object based on its particular affinity for the object's particular specialty, and the developer could focus on higher level tasks.
The drawbacks to this type of system are that it requires a different model of thinking than most developers are used to, and that it would require a specialized OS, as well as a completely new programming language. Its a shame that Microsoft couldn't get Longhorn together sooner because they already have a language of this type and an OS that will support it, Microsoft's services based language is called Indigo. It is set to be the programming language of choice for Longhorn. I have not worked with Indigo too much yet, so I am not sure if it conforms to all my hopes for a services based language, but it is definately a step in the right direction. I haven't heard anything about Sony coming up with this type of innovation, so I would have to give the edge to Microsoft. Perhaps, since each game has an OS of a sort, Microsoft will begin to distribute a framework like this for game developers to include in their games. Probably within a year, we will be seeing the peak of what the XBOX 360 can do, Sony will take longer, but their console is not set to debut for a while, so they may come up with something better from launch.