Fs2 open on Linux/Optimization: Difference between revisions

Ni1s (talk | contribs)
then looks at a picture he keept in his pocket ...
 
The error from -ftree-vectorize was worked around in r9480
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Page Navigation|
BookName=[[The fs2_open on Linux Guide]]|
CurrentPage=Optimization|Optimization|
PrevPage=[[Fs2_open on Linux/Pre-Compile Configuration|Pre-Compile Configuration]]|
NextPage=[[Fs2_open on Linux/Compiling|Compiling]]}}
<p></p>
{{Warning| If you compile a debug build, don't use the <b>-fomit-frame-pointer</b> and <b>-fno-ident</b> compiler flags, as it will make debugging impossible.}}
{{Warning| If you compile a debug build, don't use the <b>-fomit-frame-pointer</b> and <b>-fno-ident</b> compiler flags, as it will make debugging impossible.}}
<p></p>{{Note| This step is only for those who want the bleeding-edge source code to compile on their own. You can skip this if you intend to use a provided binary executable.}}
<p></p>{{Note| This step is only for those who want the bleeding-edge source code to compile on their own. You can skip this if you intend to use a provided binary executable.}}
Optimizing fs2_open might have little or no effect, or improve performance greatly, I honestly have no clue.<br>
Optimizing fs2_open might have little or no effect, or improve performance greatly, I honestly have no clue.<br>
You can specify your compiler flags with the configure script, se below.
You can specify your compiler flags with the configure script, see below.
  $ ./configure CFLAGS="<your desired flags>"
  $ ./configure CFLAGS="<your desired flags>"
If you got a i686 and want to play it safe, a good set of CFLAGS would be
If you want to play it safe, a good set of CFLAGS would be
  $ ./configure CFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer -fno-ident" \
  $ ./configure CFLAGS="-march=native -O3 -pipe -fomit-frame-pointer -fno-ident" CXXFLAGS="$CFLAGS"
  CXXFLAGS="$CFLAGS"
 
You should read up on CFLAGS and what they do before trying anything. I recommend you read through these links.<br>
In particular, the following flag has been reported to increase the FPS when not looking at nebula: (thanks to oldlaptop for this advice)
$ -fpredictive-commoning
 
You should read up on CFLAGS and what they do before trying anything. I recommend you read through these links (adjust the URL as required for your version of GCC).<br>
http://gcc.gnu.org/onlinedocs/gcc-4.2.0/gcc/Optimize-Options.html<br>
http://gcc.gnu.org/onlinedocs/gcc-4.2.0/gcc/Optimize-Options.html<br>
http://gentoo-wiki.com/Safe_Cflags
http://gentoo-wiki.com/Safe_Cflags
[[Category:FreeSpace Open on Linux|Optimization]]

Latest revision as of 09:30, 25 September 2013

« Pre-Compile Configuration The fs2_open on Linux Guide
Optimization
Compiling »

Warning: If you compile a debug build, don't use the -fomit-frame-pointer and -fno-ident compiler flags, as it will make debugging impossible.

Note: This step is only for those who want the bleeding-edge source code to compile on their own. You can skip this if you intend to use a provided binary executable.

Optimizing fs2_open might have little or no effect, or improve performance greatly, I honestly have no clue.
You can specify your compiler flags with the configure script, see below.

$ ./configure CFLAGS="<your desired flags>"

If you want to play it safe, a good set of CFLAGS would be

$ ./configure CFLAGS="-march=native -O3 -pipe -fomit-frame-pointer -fno-ident" CXXFLAGS="$CFLAGS"

In particular, the following flag has been reported to increase the FPS when not looking at nebula: (thanks to oldlaptop for this advice)

$ -fpredictive-commoning

You should read up on CFLAGS and what they do before trying anything. I recommend you read through these links (adjust the URL as required for your version of GCC).
http://gcc.gnu.org/onlinedocs/gcc-4.2.0/gcc/Optimize-Options.html
http://gentoo-wiki.com/Safe_Cflags