by Reinhard Max, August 2003
Starting at version 3.3 gcc supports profile based optimizations, which are said to be especially beneficial for things like interpreters. In my tests, Tcl gained about 3..5% in speed when compiled with profile based optimization, depending on the CPU architecture.
Compiling Tcl (or any other project) with GCC's profile based optimization goes in three steps:
Normally one would feed these additional flags into Tcl's configure script in the CFLAGS environment variable, but Tcl's build system doesn't handle this properly, and so the best practice is to hack the Makefile after running configure, and add the options mentioned above to the CFLAGS_OPTIMIZE variable.