I am looking at the optimize options in TeXmacs: tm_optimize.m4 and tm_platform.m4.
- A minor point:
-fexpensive-optimizations
intm_platform.m4
is not needed. Forgcc
, it is written in the official document that-O2
and above already include-fexpensive-optimizations
. Forclang
, on the other hand,-fexpensive-optimizations
is not supported, andclang
will throw a warning with that flag. It seems better to remove. - Seemingly there is no differentiation between
gcc
andclang
in the optimization flags. - I don’t know whether we have profiled the performance with
-O2
and-O3
systematically? Including withclang
, I don’t know whether-O3
is in general really faster.