• Building
  • Export Template Android optimize = "size" vs "speed"

How big is the difference between optimize = "size" and optimize = "speed"?

For the file size it was around 600kb so I got my APK from 7,6MB to 7MB. But what about the performance? Are there any benchmarks?

How big is the difference between optimize = "size" and optimize = "speed"?

optimize=size generally produces binaries about 15% smaller than optimize=speed, but the exact figure depends on the target platform.

There are no Godot-specific benchmarks I know of for different SCons flags, but the general figure with GCC/Clang is that -Os (the default for optimize=size) is 20% slower than -O2 (the default for optimize=speed). However, if your performance bottlenecks are not related to the CPU (such as GPU or I/O), then the difference will be lower.

@Calinou said:

How big is the difference between optimize = "size" and optimize = "speed"?

optimize=size generally produces binaries about 15% smaller than optimize=speed, but the exact figure depends on the target platform.

There are no Godot-specific benchmarks I know of for different SCons flags, but the general figure with GCC/Clang is that -Os (the default for optimize=size) is 20% slower than -O2 (the default for optimize=speed). However, if your performance bottlenecks are not related to the CPU (such as GPU or I/O), then the difference will be lower.

I honestly didn't expected such a good answer :D Thanks!