|Scilab Bag Of Tricks: The Scilab-2.5 IAQ (Infrequently Asked Questions)|
|Prev||Chapter 6. Performance||Next|
One relatively easy way to to increase Scilab's performance is recompiling it with a good compiler and an optimized BLAS library. See also the section called Hyperlinks in Chapter 8 to find out what optimized BLAS kernels are available and where to get them.
The following options are a good starting point for further exploration. They apply to compiling Fortran and C code.
This option instructs gcc to generate code specifically for architecture arch. Among other things it sets -mcpu=arch. Furthermore, it forces -malign-loops, -malign-jumps, -malign-functions, and -mpreferred-stack-boundary to their optimum values for the selected architecture without braking the ABI. Therefore, it can be considered an optimization switch.
For systems with an original 1ntel P5 or above processor this option is an absolute must. Though it breaks the ABI, the gain in speed due to avoiding the misalignment penalty for 64bit-floats is tremendous, even on PPro (and derivative) systems with all write back caches enabled.
The workhorse optimization switch, -O2, activates a lot of optimizations. See node "Optimize Options" in gcc's info file, e.g. info -f /usr/info/gcc.info.gz -n "Optimize Options"
The optimizations toggled on by -O2 are well tested and do not produce excessively long text.
This switch increases the text size, speeding up some loops. YMMV.