matrix multiplication code optimization
Moderator: Moderators
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
I looked into the Via issue last time SSE support came up. Apparently they've had SSE on their chips for a while now. Also, the newer C7 .09μm chips support SSE2/3 too, and even have an eye-popping fast FULL SPEED FPU. (Okay I had to joke about their FPU stuff since I haven't had a PC since the 486 days without a built in FPU) I think the real question is how many people do we have running pre-XP Athlons since Via processors are extremely rare by all indications. The only time I've ever seen them used has been in case modding competitions.
SSE clients don't work with SSE clients ? I thought the problem was with 387 and SSE client, why is sync a problem in case SSE clients play with SSE clients ? isn't that why the compile option exist so that SSE could be used in those cases ? althought after I have tested, compiling with gcc 4.2.0 using SSE mode did not give any improvement, but the testing was not extensive enough to fully determine that, and according to the manual of the math library used, it may happen that SSE is not generated because gcc falls back to 387 silently, don't know if this been fixed in gcc 4.2.0 or other versions, but whether it did change or not, a 20 fps boost is unlikely, and with my recent research on spring performance, I managed to get just that, although under certain circumstances, the minimal improvement was also significant, but the fps reduction is not the main concern, the game speed reducing is the main problem, maybe spring precision could be reduced to 16-bits to remove all those compatibility problems with sync and math ?
Um, I have an Athlon XP single-core processor, 2800, and I only see the CPU go over 50% when I'm playing NanoBlobs and it's a full-on all-out war, and I and an AI are sending pathing instructions to a thousand units, plus hundreds of particle systems, plus tens of thousands of COB instructions, plus... etc.
In the project I'm working on now, which features slower, more traditonal gameplay, I very rarely see CPU use go over 10%, even with FOUR players, 3 of which are AAI. It only tops 30% or so during the most massive battles. FPS still occasionally dips a bit, even on my 7800 card, but only a bit- it's never unplayable.
It's not that the occasional massive spikes in CPU activity due to waypoint commands and the scripting system and other crap aren't a problem... it's that it compounds the ability of Spring to send more data to the GPU during that frame, I think. At any rate, any amount of CPU optimization should be incorporated, if it's a simple grep-parser fix like this one, frankly. Little bits help a lot when you remember that each little bit is being done a lot of times per frame.
All that said... quit whining, all of you people using computers that are more than 3 years old. My machine is getting to be slow, by today's standards, and I will be upgrading soon. You guys with even worse hardware just need to upgrade, period. A machine with specs better than mine on everything but the graphics card is CHEAP.
In the project I'm working on now, which features slower, more traditonal gameplay, I very rarely see CPU use go over 10%, even with FOUR players, 3 of which are AAI. It only tops 30% or so during the most massive battles. FPS still occasionally dips a bit, even on my 7800 card, but only a bit- it's never unplayable.
It's not that the occasional massive spikes in CPU activity due to waypoint commands and the scripting system and other crap aren't a problem... it's that it compounds the ability of Spring to send more data to the GPU during that frame, I think. At any rate, any amount of CPU optimization should be incorporated, if it's a simple grep-parser fix like this one, frankly. Little bits help a lot when you remember that each little bit is being done a lot of times per frame.
All that said... quit whining, all of you people using computers that are more than 3 years old. My machine is getting to be slow, by today's standards, and I will be upgrading soon. You guys with even worse hardware just need to upgrade, period. A machine with specs better than mine on everything but the graphics card is CHEAP.
Argh how do you have an Athlon XP with that kind of graphics card? I was under the impression that all the new cards were PCI-Express only.LordMatt wrote:Phail. I have an Athlon 64 4000+ single core CPU.IMSabbel wrote:Concrats.LordMatt wrote:I don't think I've ever seen my CPU spike above 50% in game, even with tonnes of units.
You have
a) a dual core cpu
and
b) nicely shown that Spring also isnt multithreaded, thus even more cpu limited.
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
It may be worth testing some CPU optimizations to see if they can improve Spring's performance. If SSE could improve performance on the lower end P3 and Athlon XPs some people play with it'd definitely be worth it. I think the other big situation where Spring is CPU bound is heavy terrain deformation and large amounts of corpses that seem to really slow pathfinding. I've also heard complaints about performance with wind generators and the particles from mass nanolathing. The wind generator & nanolathing code could probably have some serious CPU optimizations since it shouldn't be synced code right?
The resources taken by the wind generator are negligible anyway, it's just one random number between minWind and maxWind that changes every now and then, probably with some interpolation in between.
Also if someone wants to test performance sure go ahead, but I can tell you in advance that the difference (if any) won't really be objectively noticable by a human so you'd need to write instrumentation code first and run the test multiple (many) times to average out variation because of the multitasking nature of your OS.
Also if someone wants to test performance sure go ahead, but I can tell you in advance that the difference (if any) won't really be objectively noticable by a human so you'd need to write instrumentation code first and run the test multiple (many) times to average out variation because of the multitasking nature of your OS.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
As for proc usage, I have a single core amd64 3800+
I have yet to see it go over 32% usage.
On a reasonably high end pc spring runs like hot sex. Now of course maybe spring doesn't run as well as it could, but hell, it's not THAT bad... Unless you're playing on your moms dell, in which case, that machine prolly had no business running spring in the first place.
I don't understand why people come to OS games and then wonder why their crappy PC doesn't run it very well. Well geez, open source devs like things to look good too. Shocking.
@Matt Motherboards are made for that proc taht support PCI-E, unfortunately all a high end gfx card like that does is transfer the bottleneck to the cpu.
I have yet to see it go over 32% usage.
On a reasonably high end pc spring runs like hot sex. Now of course maybe spring doesn't run as well as it could, but hell, it's not THAT bad... Unless you're playing on your moms dell, in which case, that machine prolly had no business running spring in the first place.
I don't understand why people come to OS games and then wonder why their crappy PC doesn't run it very well. Well geez, open source devs like things to look good too. Shocking.
@Matt Motherboards are made for that proc taht support PCI-E, unfortunately all a high end gfx card like that does is transfer the bottleneck to the cpu.