[Haskell-cafe] cabal sdist warns about optimization levels
petr.mvd at gmail.com
Sun Jan 13 21:27:44 CET 2013
I'm working on a library for fast sorting of MArrays. The library is
primarily about speed, so I added
to the cabal file. Now cabal sdist complains with:
'ghc-options: -O2' is rarely needed. Check that it is giving a real
benefit and not just imposing longer compile times on your users.
(1) Is there a way how to disable the warning? As the main aim of the
library is speed, I believe -O2 is appropriate here. And since the code is
quite short, I'm quite sure the increased compile time won't be noticeable.
(2) Why does cabal complain about it at the first place? I found a
reference saying the warning is adequate:
but not saying why. Maybe for complex programs -O2 prolongs compile time
too much, but libraries are usually compiled once and used many times, so
using -O2 for them seems reasonable in many cases.
Thanks for help,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe