
3 Nov
2008
3 Nov
'08
1:55 p.m.
ketil:
Henning Thielemann
writes: I think it is a good idea to switch this feature on and off by a compiler switch.
I agree. Same with Int overflow checking, if it can be done at all.
The interesting question is how to name it, the obvious
-funsafe-optimization
might imply that these optimizations are fun and safe, which is probably misleading :-)
The uvector package as -funsafe, which disables bounds checking on primitive reads/writes. It's a compile time flag to cabal that sets a #define, that then let's GHC optimise away a guard. So there's precedent. -- Don