ghc_rts_options (defalting RTS flags)

Thomas DuBuisson thomas.dubuisson at
Mon Sep 13 21:09:45 EDT 2010


A recent SO question [1] led me to do a quick test on hard-coding RTS
options as suggested in the manual rts-hooks section [2].
Unfortunately the timing tests indicate "ghc_rts_opts" isn't being
used; tests with flags besides -N (ex: "-H1024m") also show the
ghc_rts_opts being ignored.  Can someone shed light on what's
happening?  A grep of ghc source shows no users of ghc_rts_opts,
though that isn't definitive.


$ cat rts-opts.h
char *ghc_rts_opts = "-N";

$ ghc --make -O2 -threaded hashPar.hs rts-opts.h  -fforce-recomp
[1 of 1] Compiling Main             ( hashPar.hs, hashPar.o )
Linking hashPar ...

$ time ./hashPar 10MB 10MB 10MB 10MB

real    0m2.411s

$ time ./hashPar 10MB 10MB 10MB 10MB +RTS -N

real    0m1.690s


More information about the Glasgow-haskell-users mailing list