Dear ghc experts,

I need an advice on  -O, INLINE, NOINLINE  usage for ghc-4.01 and 
highers.
My program contains many short definitions, like, say,

  bound = 2^20 :: Integer

  lc :: C a => Pol a  ->  a 
  lc           (Pol ms _) = fst (head ms)

- also many of them are the class operation definitions.

They need to be INLINE-d  - into any piece of optimised code.
But this implies the neccessity of -O compilation key for the whole
given module. Right?
And this module, it often contains also the large parts that do not 
need -O. Re-arranging between the modules specially for -O is very 
un-desirable.
The impression of the earlier versions was that  -O -ing *everything*
often leads to worse run-time cost code - right?
So i think of the decision:  
  to compile all modules with -O 
  and mark with {-# NOILINE ...#-} the chosen parts to avoid 
  un-neccessary inlining.
What is your advice?

And it looks like  ghc-4.01 -c -O  ignores NOINLINE.

I am not so eager for these optimisations right now, in ghc-4.01.
But in principle, how to optimise these things?

It was said, ghc-3.02 had problems with inlining of polymorphic 
values. Had this impoved?


------------------
Sergey Mechveliani
[EMAIL PROTECTED]






Reply via email to