Game performance optimization

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Kalai
Engineer
Engineer
Posts: 3
Joined: 28 Jun 2014 07:30

Game performance optimization

Post 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.
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 708
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can... Almost 20 years and counting!

Re: Game performance optimization

Post 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.
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Game performance optimization

Post 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.
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 708
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can... Almost 20 years and counting!

Re: Game performance optimization

Post 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?
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Game performance optimization

Post 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
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: Game performance optimization

Post 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€.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 16 guests