3 ms·
For arbitrary programs, the only way to determine performance is to measure measure measure. Anything else requires having a perfect model of the running system
by carterschonwald 9y ago
For arbitrary programs, the only way to determine performance is to measure measure measure. Anything else requires having a perfect model of the running system and the hardware and environment. Which is best replicated by measuring the actual performance.
Certain libraries , such as any doing fusion based optimization, do generally benefit from O2. But at the end of the day measure measure measure.
I’m not familiar with Ofast. I’ll look it up. Looked it up, nope ghc doesn’t have anything like that, and there’s a few parts I hope to help mature in ghc before it’s safe/sane to even consider the analogue of fast math flags and standards breaking optimization. Especially since changing the meaning of programs via optimization flags would be pretty dangerous for a language like Haskell.
There’s def room for other compilation/semantic models to do aggressive optimization in different ways. But not for Haskell today :)