You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some package authors will want to enable C flags for their FFI C code in order to get good performance (or avoid terrible performance) by default for their users. However some of these flags are not portable across compilers and versions.
-march=native for instance, gives a solid performance boost, but is unsuitable for distributing binaries. We should probably encourage the pattern of having a cabal.project for local development and a cabal.release.project file that enables it.
This information would be located in the user guide's How to package Haskell code section.
The text was updated successfully, but these errors were encountered:
Suppose you have two packges up and down, where down depends on up. up is passed options to make the generated object code more efficient, but down isn't. If code from up then gets inlined into down then it will be compiled with the flags for down, and so the extra optimizations won't fire.
Because you can't know how code will get inlined, it's best to apply these flags to your entire project or not at all. Otherwise you can have confusing behaviour, eg, your code may be faster if stuff doesn't get inilned. Alternatively you have to be very careful that no code that depends on the flags can be inlined.
Some package authors will want to enable C flags for their FFI C code in order to get good performance (or avoid terrible performance) by default for their users. However some of these flags are not portable across compilers and versions.
-march=native
for instance, gives a solid performance boost, but is unsuitable for distributing binaries. We should probably encourage the pattern of having acabal.project
for local development and acabal.release.project
file that enables it.This information would be located in the user guide's How to package Haskell code section.
The text was updated successfully, but these errors were encountered: