A small program Main.hs compiled with -O runs 10 times faster or 
slower depending on the export list
                       module Main (main)
or                     module Main (main,test)
Is this a bug?

Please, tell me, how to make  -O  work in  ghc-2.08-i386-all-linux ?
I am trying  -O  in Makefile  for some critical modules of certain 
large project, but cannot predict when this occures useful.
The only result so far is this small program in Main.hs which exports
only `main'.
First, I decided to omit -O at all;  then met occasionally this 10 
times acceleration and thought it worths trying ...

In  ghc-0.29  the performance for -O was predictable.
What I work now with is the binary snapshot  ghc-2.08-i386-all-linux 
by S.Panne.  But maybe, this is common for all  ghc-2.08 ?
May it help to build ghc from sources (not so simple for 20Mbyte RAM)
?

Another question: 
does it worth to set things like  {-# inline 0 f #-}  or  
                                  {-# inline 1 f #-}  
- has  ghc -c -O   (2.08 or future) to be clever enough to guess 
what to inline?


Thank you in advance.

------------------
Sergey Mechveliani

[EMAIL PROTECTED]

Reply via email to