- 19.05 (released) ...
Tuning a program
The best way to speed up a program is of course to improve the algorithms and data structures you are using. Spotting the functions that slow down the execution and improving can change a lot in a program. Profiling can be used for this.
Try to keep the number of classes and objects in your system as low as possible to ensure maximum efficiency. This should never hinder the design of the system, though.
You can also use the functionality provided by the MEMORY class to tweak the garbage collector behavior according to your needs. However, be careful with this, since providing erroneous parameters might lead to memory leaks, huge memory consumption, or on the contrary a dramatic slow down of the application. If you are not entirely sure what a parameter is for, avoid changing it. The default values should fit for most standard applications.
On top of that, EiffelStudio provides powerful optimizations, some being done automatically, others being configurable. To obtain a maximum efficiency, it is recommended to Finalize your program from scratch and without using precompiled libraries.
In the Project Settings dialog advanced section , try experimenting with the Inlining option, and setting the maximum size of features that should be inlined. Only Eiffel features are inlined by this option, to see how to inline the C functions you may be using in your program, please refer to your C compiler documentation.
In the Project Settings dialog advanced section , enabling the Dead code removal will help produce smaller executables.
Removing the Execution Trace will optimize the executable in size and speed, but in case of crash no information will be available.
All these options are located in the Project Settings dialog, in the Advanced section. They are only effective during finalizations.