Possible performance improvements

Possible performance improvements

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

Moderator: Moderators

Post Reply
eyu100
Posts: 182
Joined: 05 Jul 2008, 04:10

Possible performance improvements

Post by eyu100 »

1. I found a hash algorithm that may be faster than the currently used Hsieh hash (as of 0.78 - I don't have a newer version of the source code). It can be found at http://murmurhash.googlepages.com/. It is faster at least on the Core 2 Duo. MurmurHash 2.0 calculates a hash at about 2 GB/s, more than twice as fast as the next fastest hash algorithm listed (SuperFastHash).

2. Since the sqrt() function makes up around 10% of Spring's CPU consumption (see <a href=http://springrts.com/phpbb/viewtopic.ph ... 16953>this thread</a>), are any optimizations planned? I know SSE has a sqrt instruction, and I heard that SSE would be used in the next release of Spring.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Possible performance improvements

Post by Auswaschbar »

U didn't read the soruce right:

Code: Select all

/** @brief a fast hash function
                 *
                 * This hash function is roughly 4x as fast as CRC32, but even that is too slow.
                 * We use a very simplistic add/xor feedback scheme when not debugging. */
eyu100
Posts: 182
Joined: 05 Jul 2008, 04:10

Re: Possible performance improvements

Post by eyu100 »

2. Since the sqrt() function makes up around 10% of Spring's CPU consumption (see <a href=http://springrts.com/phpbb/viewtopic.ph ... 16953>this thread</a>), are any optimizations planned? I know SSE has a sqrt instruction, and I heard that SSE would be used in the next release of Spring.

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

Re: Possible performance improvements

Post by lurker »

It uses SSE right now. x87 has a square root opcode too; does the SSE version have a specification for what it outputs down to the bit, so it'll sync?
Post Reply

Return to “Engine”