As has been announced, the next release of Xojo will provide LLVM compilation of 64 bit applications. Eventually, all Xojo apps will be compiled using the LLVM compiler. I have filed a feature request to seek user access to the compiler optimization levels so that we can debug at a low level (which is fast) but create apps with high level optimization if such is desired. I ask all users to consider adding your support to this request if you believe it would be helpful in your work. Here are the details:
<https://xojo.com/issue/39277>
Feature Request: Provide LLVM Compiler Optimization Options for Xojo applications
All Xojo users will benefit from the new LLVM compiler, but in its current implementation, the user has no ability to adjust the optimization levels. We seek the ability to specify the optimization level along the same lines as already provided by the Xojoscript compiler, with some additional options.
This could be a simple PopupMenu or ComboBox providing options such as -00, -01, -02, -Os, -Oz, -03, -04 where
-00 means no optimization (best for debugging, fast compile) and the higher numbers indicate improved optimization but longer compile times. Based on other implementations of the LLVM compiler, I recommend:
-02 (moderate level of optimizations to enable most optimizations. These options are selected by the Xojo team to be the most meaningful for Xojo code, but avoid those that significantly increase compile time.)
-0s (similar to -02 in optimization, but reduces code size)
-0z (similar to 0s but reduces code side further)
-03 (improved optimization over -02 but implements those optimizations that take much longer, or increase code size such as loop unrolling and in-line code)
-04 (highest level of optimization including link-level optimization. This might involve an hour or more of compiler time, and would only be selected for final compiles of working code that need to be fully optimized prior to distribution.)
-01 (somewhere between -00 and -02 but selects those optimizations which are fast. A compromise useful for debugging and testing.)