RE: link statically with libc?

(PS: Am I looking in the wrong places, or are a lot of GHC options undocumented? I seem to remember options being brandished about (turn of array bounds checking, tuning unboxing and stuff) that I'm unable to find documented anywhere.)
There might be one or two undocumented optimisation knobs, but I believe everything that is actually useful is documented. Anything undocumented is either broken or experimental. There isn't a flag to turn off array bounds checking - it would require compiling against different libraries. There are array operations that avoid bounds checking, however (eg. unsafeRead, unsafeWrite). The flags that affect automatic boxing/unboxing are -funbox-strict-fields and -fno-strictness. Cheers, Simon

"Simon Marlow"
There isn't a flag to turn off array bounds checking - it would require compiling against different libraries.
I must have misremembered it from somewhere, perhaps confusing it with -fliberate-case-threshold mentioned a while ago (which probably belongs in the "experimental" category?) Turing off bounds checking could be fairly useful, I think, if there is a significant speedup to be gained. My impression is that the typical Ada programmer tests the program thoroughly with bounds checking, but compiles without for deployment. (Of course, we would rather *know* a priori that we're not going out of bounds, rather than just test for it, but it seems to work all right for them)
There are array operations that avoid bounds checking, however (eg. unsafeRead, unsafeWrite).
I suppose I can do it by wrapping array accesses in a class or otherwise, with a safe and an unsafe implementation, and switch when I'm satisfied things work. -kzm PS: is large file support in the vicinity yet? -- If I haven't seen further, it is by standing in the footprints of giants
participants (2)
-
ketil@ii.uib.no
-
Simon Marlow