Serious discussion regarding SSE/SSE2 - Page 2

Serious discussion regarding SSE/SSE2

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: Serious discussion regarding SSE/SSE2

Post by YokoZar »

Is there a way to (optionally) enable SSE in only unsynced code?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Serious discussion regarding SSE/SSE2

Post by AF »

If we can add SSE and SSE2 support in critical components such that the support can be turned on and off, then we can do a simple test and enable it in offline games, and fi all clients and hosts support SSE then it can be enabled for that multiplayer game too.

The simplest and quickest method of enabling it for unsynced code would be if unsynced code existed in a separate library. I can imagine we could have SSE enabled versions of unitsync and the dedicated server.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Serious discussion regarding SSE/SSE2

Post by Auswaschbar »

AF wrote:The simplest and quickest method of enabling it for unsynced code would be if unsynced code existed in a separate library. I can imagine we could have SSE enabled versions of unitsync and the dedicated server.
I can't. The dedicated server doesn't need any cpu time, and unitsync only needs it before a game, where it is not critical.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Serious discussion regarding SSE/SSE2

Post by AF »

Indeed but it would speed up loading hashing etc of maps and mods a lot and sometimes that can take quite a while to happen. So maybe not a game speed up but a great help for the lobby nonetheless
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Serious discussion regarding SSE/SSE2

Post by Tobi »

Hashing won't go faster due to SSE. (not easily vectorizable and it's usually IO bound anyway.)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Serious discussion regarding SSE/SSE2

Post by AF »

On another note, would it be safe to make expensive operations multithreaded via the lobby? aka Is it safe to hash mods and maps using multiple threads? Or would this cause unitsync crashes?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Serious discussion regarding SSE/SSE2

Post by Tobi »

Currently this isn't safe. The hashing can't even be done multithreaded by a lobby because it all happens in Init call.

You can, however, use a background thread for all unitsync stuff so you can use unitsync asynchronously, so your GUI doesn't block when e.g. getting minimap from unitsync.
altie
Posts: 8
Joined: 18 Aug 2007, 22:09

Re: Serious discussion regarding SSE/SSE2

Post by altie »

Would there be any value to generating binaries with Intel's compiler and performance primitives? Maybe more to the point, how far is the project from being robust enough in floating point for output from that to interoperate between CPUs with different levels of instruction set support?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Serious discussion regarding SSE/SSE2

Post by hoijui »

it is possible to compile spring with the intel compiler, but about performance primitives...
if it is of value.. i don't know, but what yo uare talking about is non-GPL compatible software, right?

..in other words... please explain in more detail what you want :D
altie
Posts: 8
Joined: 18 Aug 2007, 22:09

Re: Serious discussion regarding SSE/SSE2

Post by altie »

hoijui wrote:..in other words... please explain in more detail what you want :D
Better performance on my broke-ass Prescott.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Serious discussion regarding SSE/SSE2

Post by Pressure Line »

smoth wrote:How the F*** do you play with that machine!?!?
AMD Semperon (?) 1.6GHz
AGP GF7300GT
768MB DDR ram

perfectly playable at 20-40 fps for most games (although comm/nuke explosions and 300 fleas [swear to god] pathfinding give me a bit of slowdown)
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Re: Serious discussion regarding SSE/SSE2

Post by clericvash »

Pressure Line wrote:
smoth wrote:How the F*** do you play with that machine!?!?
AMD Semperon (?) 1.6GHz
AGP GF7300GT
768MB DDR ram
Your f-ing kidding me right, that is ancient as hell, for cheap as chips u can get a processor 3x as powerfull nowadays dude. And not even DDR2 ram?
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Serious discussion regarding SSE/SSE2

Post by Pressure Line »

Image

srsly.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Serious discussion regarding SSE/SSE2

Post by lurker »

Tobi wrote:Currently this isn't safe. The hashing can't even be done multithreaded by a lobby because it all happens in Init call.

You can, however, use a background thread for all unitsync stuff so you can use unitsync asynchronously, so your GUI doesn't block when e.g. getting minimap from unitsync.
This gives me an idea. Would it be relatively easy to move hashing to happen only when unitsync is asked about maps and/or mods? Then the dedicated server wouldn't have the startup speed issues it sometimes has now.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Serious discussion regarding SSE/SSE2

Post by Tobi »

Dedicated server uses unitsync?

I thought it just behaved as if it had all maps and mods and only forwarded network traffic...
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Serious discussion regarding SSE/SSE2

Post by BrainDamage »

Tobi wrote: I thought it just behaved as if it had all maps and mods and only forwarded network traffic...
it does as long as you provide the map/mod hash in the script.txt

the only disadvantage is that this way the server is not aware of map start positions (so fixed & random start positions are messed)
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Serious discussion regarding SSE/SSE2

Post by lurker »

It loads unitsync with a full scan, even when you give it checksums.

FileSystemHandler::Initialize(false);
User avatar
Scikar
Posts: 154
Joined: 30 Jan 2006, 07:13

Re: Serious discussion regarding SSE/SSE2

Post by Scikar »

clericvash wrote:
Pressure Line wrote:
smoth wrote:How the F*** do you play with that machine!?!?
AMD Semperon (?) 1.6GHz
AGP GF7300GT
768MB DDR ram
Your f-ing kidding me right, that is ancient as hell, for cheap as chips u can get a processor 3x as powerfull nowadays dude. And not even DDR2 ram?
How would he get a DDR2 motherboard for a processor that ended production years before DDR2 came out?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Serious discussion regarding SSE/SSE2

Post by Auswaschbar »

lurker wrote:It loads unitsync with a full scan, even when you give it checksums.

FileSystemHandler::Initialize(false);
No, it doesn't load unitsync (and doesn'T need it at all), especially not with FileSystemHandler::Initialize(false);
Its just unitsync using the same function as the dedicated server.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Serious discussion regarding SSE/SSE2

Post by lurker »

Is it more correct to say it runs the same slow archive-scanning code that you get when you load unitsync? I didn't really mean if it loaded an external lib or not, I meant the code it runs. If you tell me that's wrong, well, we'll have to talk.
Post Reply

Return to “Engine”