Code: Select all
-O3 -Os -pipe
Moderator: ickputzdirwech
Code: Select all
-O3 -Os -pipe
I had tested the "-O3 -Os -pipe" parameters setting and the compiled application was working faster then without them.
I haven't tested it yet, but I may try in future codingAnd I'm sure you forgot to include LTO. While that takes massive time and memory to then link the game the improvement is often huge. If you have enough memory for it.
-pipe means the compiler outputs the assembly code directly to as through a pipe instead of writing a tempfile and running cc and as sequentially. Gives a little bit of parallelity but if you build with -j already it should be irelevant.mcgiwer wrote: ↑Fri Sep 10, 2021 3:38 pmI had tested the "-O3 -Os -pipe" parameters setting and the compiled application was working faster then without them.
In case it got forgotten:
- -O3 -> optimises the code for speed
- -Os -> optimises for size
- -pipe -> optimises compilation speed
I haven't tested it yet, but I may try in future codingAnd I'm sure you forgot to include LTO. While that takes massive time and memory to then link the game the improvement is often huge. If you have enough memory for it.
These optimization flags more often than not cause more problems than they solve. It's nice you're learning about compilers, but this suggestion is wholly unnecessary & somewhat dangerous/waste-of-time.mcgiwer wrote: ↑Fri Sep 10, 2021 2:22 pmHello. I would like to ask the game development team to use while the compilation process following compilator switches:
This way, the code becomes optimised for the speed and low size, thru with Factorio would work faster then currently. ThanksCode: Select all
-O3 -Os -pipe