There are other optimizations that you can use, if you need to speed up some code. But they do not come as command line option.
procedure Foo(const a: TFoo; const b: string);
The compiler may pass the data as reference, if it thinks that would benefit. And with AnsiString the compiler will omit the ref-counting.
However, remember this syntax means:
you promised the compiler a and b will not change.
The compiler will reject the obvious. But...
Say you pass "GlobalVarA" => and the code (or any code in nested subroutines or callbacks) changes GlobalVarA => then you broke the promise. And then the app can randomly fail. It may run well for 100 times, and then fail the 101th time.
{$ImplicitExceptions off}
May save a bit of time. Usually when you deal with ansistrings or dyn array.
But, if you use exceptions, then it will leak memory (and if that builds up, really slow down things and crash eventually)
Basically, if you deal with managed types (ansistring, dyn array, interface, ...) then the compiler inserts a hidden "try finally" to make sure the mem is freed.
The directive means there is no "try finally". Just code to free the memory. Works fine, if the procedure is exited normally.
google "freepascal whole program optimization".
It can get you another small increase. (e.g. de-virtualization)
But the most gains will be in choosing a good algorithm. (Big O / thread pools / ...)
And if you have huge data, organizing it to reduce cache misses. (I.e. optimize the layout for the order in which you access it)