Most games are 80% general purpose code and 20% FP...

Oda

Newcomer
Is this claim by MS true? I really can't say I'd have any idea if it is or not, but even with my basic knowledge of programming it sounds kinda absurd.

I mean, aren't most physics and A.I code done using FP?
 
I'd ask the same question, but I already know that pinning down all games to one statistic like that just can't be done. Every game is different.

Beyond that it does seem off to me though. I ain't a dev, but it's just a hunch. Just sounds like an easily digestable PR soundbite to influence perception of their CPU.
 
Sounds like it to me too or why would Microsoft go for a chip that is better at fp but not as good at general processing. Why would they not go for a dualcore pentium or athlon as they would be cheaper than spending the r&d and would probaly give better general code performace,
 
It might be true for PC-Games - which seems naturally given that the CPUs are rather poor at it. But even then the 20%FP and Vector Math will account for 80% of the Performance I guess. 8)

If you look at the PS2 with its strong FP-Capabilities and piss-poor General-Purpose PErformance then the statement is obviously not correct
 
Oda said:
Is this claim by MS true? I really can't say I'd have any idea if it is or not, but even with my basic knowledge of programming it sounds kinda absurd.

I mean, aren't most physics and A.I code done using FP?

Well, I am not sure in what direction you want to take the result, but it's probably wise to consider that this statement seems to pertain to the actual game code. In other words, it doesn't seem to state that 80% of the execution time is spent on general code and 20% on floating point.

It's important to consider this when thinking about what the statement actually means. You could write a program with a hundred lines of code, but execution is spent looping around only two or three of them. So, you could make some claim that 3% of the code uses the CPU 99% of the time.

In this context, of actual code, it would seem very probable that 20% of the code involves some floating point function.

I would assume AI code is hardly any floating point at all and is mostly 1 or 0 with lots of switches (if then). Physics would benefit from floating point to bring more realism.

Lastly, I would just like to restate what I just said in a more direct matter (because I think I read into this that you want to believe there to be MORE floating point code). It's not really important how much code is what. What is important is how efficient and effective the code is at bringing desired reults and how the hardware is capable of handling that code. Modern CPUs are very able at floating point compared to just a decade ago. It wasn't long ago that floating point was handled by an external co-processor. Back then (in the stone age), floating point math brought everything to a screeching halt so it was avoided like the plague. It was much like the 3% code taking up 99% of the execution time in my example above. Floating point is used to gain precision and precision is usually needed when you have lots of iteration (unless you are just looking to present the user with very precise numbers) and therfore it makes sense to think that flaoting point maths come into loops a lot. So, even 20% of code that involves floating point would occupy a proportionally larger slice of CPU time.
 
If you look at the average precentage of floating point instructions executed in SPECfp2000, it seems like it could be true.
(I know, it's not a game but it is the only statistics I've got)

Code:
 2% store int
 2% comare int
 4% logical operations
 4% conditional branch
 5% load immediate
 7% store FP
 9% mul FP
10% add/sub FP
15% load int
15% load FP
26% add/sub int

Data taken from Hennessy/Patterson - Computer Architecture A Quantative Approach, third edition.
 
rendezvous, you're telling us that Apples are a lot better than Oranges here.

Sure, I believe it's the only statiscal source you found, but still that doesn't help with the subject at hand. :)
 
pc999 said:
This dev agrees , and varius members of this (B3D) forum think that he is a respectable one soo...

http://www.psinext.com/forums/viewtopic.php?p=129042#129042

80% "general purpose" vs. 20% FP sounds pretty accurate, actually..

That dev is actually a member of this forum though, so let him answer the question on his own if he chooses. 8)

(He was addressing my question however so of course that post sprang immediatey to my mind as well pc999)

I do think he is respectable though.
 
Reading his post, to clarify he seems to be talking about code volume vs running time, and I think the latter is just a little more relevant..
 
Vysez said:
rendezvous, you're telling us that Apples are a lot better than Oranges here.

Sure, I believe it's the only statiscal source you found, but still that doesn't help with the subject at hand. :)

I'm not telling you which fruit is the best.
I'm showing you that one basket of citrus fruits which are floating point heavy only 20% of the executed instructions are floating point instructions.
While this hardly tells if apples share the same distribution of instructions, I do believe that it shows that Microsoft’s claim isn't absurd, which was the question of the thread starter. :)
 
Xenus said:
Sounds like it to me too or why would Microsoft go for a chip that is better at fp but not as good at general processing. Why would they not go for a dualcore pentium or athlon as they would be cheaper than spending the r&d and would probaly give better general code performace,
Precisely my point when this statement came out. If general purpose is so important for gaming, why the hell did MS skimp out on general purpose performance when designing their processor?!

Seems to me this 80/20 statement was concocted solely for anti PS3 propaganda. 'We are 3x better at PS3 in this respect, so we will make out this is more important than what PS3 is good at'. It's very probably true for existing game code, but those games are written to work on a good GP CPU. Games are written to the hardware, and next-gen console games will find ways to use the streaming FP abilities as the console designers intended.
 
xbdestroya said:
That dev is actually a member of this forum though, so let him answer the question on his own if he chooses. 8)

(He was addressing my question however so of course that post sprang immediatey to my mind as well pc999)

I do think he is respectable though.

I didnt know he post here also, I think he his respectable too, I has posting that to gave more force than "a guy how say he his dev in...".
 
Reading his post, to clarify he seems to be talking about code volume vs running time, and I think the latter is just a little more relevant..
Sure enough. But were you expecting relevant statistics from someone whose job it is to help sell points of their product?

The key line is definitely the one that says "All indications I get from both 360 and CELL is that each and every memory access is going to kill you, rip out your heart and dance on it, and then when it's done, it will murder your children."

That at least leads in the direction that the running time of "general purpose" code on 360 would be pretty heavily weighted towards "general purpose" over floating point -- but certainly not for good reasons. It would be because you see utterly evil levels of stalling. I'm fairly sure that if you very brazenly accessed memory (and we all know what a crime that is) on Xenon as much as you do on PC, the console would never come close to PC performance.
 
Microsoft is betting several billion dollars that their CPU design is the best design. (As is Sony, of course :) ) Both companies probably considered a wide variety of CPU architectures before they chose their current ones.

In particular MS chose their architecture after Sony had announced the broad outline of the Cell architecture.

I think if MS thought that Cell was the best design approach, then they would have gone with a 4-SPE-and-one-PPC design. Sure, it might not have been exactly an SPE, due to licensing and IP issues, but I'm sure that IBM could have legally come up with something similar enough that it wouldn't make much difference.

Similarly, if MS thought that a low-end Pentium M or P4 would be the best CPU, then they would use that instead. They can't use a high-end dual core Pentium M or G5 because it would cost too much.

I think Microsoft honestly believes that general purpose cores are more useful to video games than SPEs. Now, they may be mistaken. But look at how things turned out last generation: Sony's super-custom EE was roundly out-performed by a low-end P3, mostly due to better caches (and out-of-order-execution) on the P3. It's quite possible that MS, the word's most successful software company, might know something about computer architecture design. And don't forget that IBM, who also knows something about computer architecture design, also proposed a four-PPC architecture to Sony, only to have Sony insist on the more risky Cell architecture.

Another way of looking at things is that MS is betting on improving game code as it is now, while Sony is betting on improving game code as it might become. Sony is betting that if they provide 7 SPEs then developers will figure out how to use them, even if it means contorting their game code to use far more streaming floating point than they otherwise would.

Historically, we saw that the Pentium's high-speed floating point gave it an advantage in some important games (specificly Quake) over other x86 processors. Perhaps history will repeat itself this time.

On the other hand, perhaps not.

It will be very interesting to see how things work out!
 
I think this data is inaccurate. It may be that existing last generation games exhibit these statistics, but previous generation games are not physics or synthesis bound. I have already demonstrated in other posts how physics is FP bound as well as how collision detection can be made to work efficiently without branch prediction, as well as how it can be parallelized.

The XB360 isn't a great general purpose system, and an X2 or dualie Pentium would have worked alot better, so I find Microsoft's protestations on this issue pure FUD. If they were so all forseeing, then why did they go with IBM, when Apple has abandoned PPC for quite obvious reasons.


Maybe MS should run a stress test of Havok/Novodex/ODE, and count FP performance. And if MS is right, why did Ageia design a hardware physics accelerator that is not a general purpose CPU, but a highly parallel SIMD FP machine?
 
shaderguy said:
I think if MS thought that Cell was the best design approach, then they would have gone with a 4-SPE-and-one-PPC design.
I don't think MS could afford to have that margin of time to request someone to design and test an unproven new architecture like Cell. The MS-IBM deal was announced back in 2003.
 
DemoCoder said:
The XB360 isn't a great general purpose system, and an X2 or dualie Pentium would have worked alot better, so I find Microsoft's protestations on this issue pure FUD. If they were so all forseeing, then why did they go with IBM, when Apple has abandoned PPC for quite obvious reasons.

Well I don't disagree with the majority of your post, but certainly Microsoft could not have looked to Apple's example as:

a) that 'example' only occured a couple of weeks ago, contrasted to Microosft's move years ago

and

b) Apple's move has more to do with strategic business decsions based around successful notebook designs and lowering acquisition costs

I don't think it implied that Apple felt the PPC architecture was, in and of itself, terrible.

That being said though it's true that Microsoft touting the 'general performance' capabilities of the 360 is a bit of a sleight of hand, since just because it's better than Cell at 'general performance' code, doesn't mean it's any good at it.
 
Apple dropped power PC due to IBM not keeping up with thier processor demands. IBM couldn't manufacture them internally quick enough. It had nothing to do with the technology itself.


Not only that comparing the performance of a OOO cpu to and In order CPU on un optimized code is a waste of time. Optimize both and see how much of a difference there is.
 
Qroach said:
Apple dropped power PC due to IBM not keeping up with thier processor demands. IBM couldn't manufacture them internally quick enough. It had nothing to do with the technology itself.

Well when you say the technology itself, are you refering to the PPC architecture or their performance in an environment like, say a notebook?

Because certainly Intel has a technology edge when it comes to low-power, low-wattage computing in the form of the M, and looks to get stronger with Yonah. So I don't think it's soley a yields/clockspeed issue with IBM and their *G* line.
 
Back
Top