Optimize options in compliation of TeXmacs

I am looking at the optimize options in TeXmacs: tm_optimize.m4 and tm_platform.m4.

  1. A minor point: -fexpensive-optimizations in tm_platform.m4 is not needed. For gcc, it is written in the official document that -O2 and above already include -fexpensive-optimizations. For clang, on the other hand, -fexpensive-optimizations is not supported, and clang will throw a warning with that flag. It seems better to remove.
  2. Seemingly there is no differentiation between gcc and clang in the optimization flags.
  3. I don’t know whether we have profiled the performance with -O2 and -O3 systematically? Including with clang, I don’t know whether -O3 is in general really faster.