Page 1 of 1

Game performance optimization

Posted: 04 Jul 2014 10:01
by Kalai
I think someone here would like to read this: http://www.reddit.com/r/openttd/comment ... ld_r26335/

If such a performance increase was achieved, imagine the load on servers this will make if anyone is willing to test it out.

Re: Game performance optimization

Posted: 04 Jul 2014 22:52
by Digitalfox
What is said:
(Updated 2014/7/4) Updated builds.

Hello all.

Since I've been working on Server 5 which utilizes the same build revision as Server 2 and 4, I've been noticing how much Openttd is able to drain your CPU cycles especially with larger maps and with A LOT of vehicles/grfs.

So I've decided to re-compile the source code including "reddit_v3i.diff" patch with the Intel C++ compiler so optimize the game quite a bit. (Yes it also works with AMD)

Compiling Info Summary: i686: -O2, Baseline Code: SSE2, Optimized Path Code: SSE4.2/AVX, Interprocedural Optimization, etc x64: -O2, Baseline Code: SSE3, Optimized Path Code: SSE4.2/AVX, Interprocedural Optimization, etc

In basic language it means the game will run smoother with these binaries and most likely reduce CPU usage.

After having done numberous self analysis with the exact identical workloads, I've observed some big CPU usage drops. (64.286% decrease in the last condition I tested)

The instructions for installing this are quite simple.

Download the 32 or 64-bit version.
If you are new to this, extract the zip file to your desktop and start openttd (.exe).
If you already had a Reddit custom build on your PC: Unzip the archive you've just downloaded and copy over the file Openttd (.exe) to your old Reddit build map. It will ask you to replace the file that's already there and confirm. All other files and maps can be ignored.
That's it. Nothing else to be done, you will retain all your configuration and settings.

Here are the links. (Me DigitaFox am on purpose not including the links on this quote
I've already download intel c++ compiler (+600€ WOW) and I'm going to give a test on this. It just sucks that VS express can't be used and I had to download VS Pro to integrate Intel c++. Tomorrow or very soon I'll post my thoughts.

Re: Game performance optimization

Posted: 18 Jul 2014 20:20
by Gigigonzalez
Builds have been re-upped not a long while ago for some extra few % more speed! (with PGO) and some stability fixes.
I use VS2010 to do it.

Re: Game performance optimization

Posted: 19 Jul 2014 00:07
by Digitalfox
I've been doing some (a lot :mrgreen: ) NFO and NML coding this last weeks and haven't had time to try the Intel compiler add-on.

It's in a folder (it really is) waiting for time :oops:

Could give some more details on the performance improvements?

Re: Game performance optimization

Posted: 05 Aug 2014 04:34
by Gigigonzalez
Digitalfox wrote:I've been doing some (a lot :mrgreen: ) NFO and NML coding this last weeks and haven't had time to try the Intel compiler add-on.

It's in a folder (it really is) waiting for time :oops:

Could give some more details on the performance improvements?
Pretty huge when properly compiled. Ive seen improvements up to 50/75% from a normal Visual Studio compiler etc in heavy workload conditions (Tons of vehicles, on screen etc in a huge map)

pretty easy to compare

Re: Game performance optimization

Posted: 05 Aug 2014 14:34
by krinn
Digitalfox wrote:I've already download intel c++ compiler (+600€ WOW)
Intel compiler use the ISDP license, that is free for non commercial use. So except if you plan to build openttd with icc and release the binaries to sell them, it's 0€.