Is it possible to use gcc like compiler flags? (ex. -ffast-math)
Some solutions implemented on C & Zig uses compiler flags to achieve tangible perfromance boost when leveraging compiler flags for optimiations.
gcc (-Ofast):
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
>> Disregard strict standards compliance. -Ofast enables all -O3 optimizations. It also enables optimizations that are not valid for all standard-compliant programs. It turns on -ffast-math, -fallow-store-data-races and the Fortran-specific -fstack-arrays, unless -fmax-stack-var-size is specified, and -fno-protect-parens. It turns off -fsemantic-interposition.
Or Zig
https://github.com/karpathy/llama2.c/issues/432#issuecomment-1774922109
How to tune mojo compiler to achieve similar results?
0 Replies