To my 


Me> For, with -O and much in-lining, the interfaces may be very large.

Simon Marlow <[EMAIL PROTECTED]> replies

Ma> You really don't want to use -O with GHCi (in fact, at the  moment
Ma> you can't).

Me> This may be serious. For example,  putStr $ show (sum1 [1..n])
Me> will need a constant memory or O(n) memory depending on the  -O
Me> possibility.

Ma> True.  But compiling with optimsation takes 2-3 times longer than
Ma>interpreting - if you're prepared to wait that long, you might as well
Ma> compile instead.  Compiling will give more of a performance boost in
Ma> general (about 10x) than turning on -O (perhaps 2x).


??
I do not understand. I meant  -O  only for  ghc --make -O
(has -O sense in other situation?) 
to compile _once_ the whole application library.
.o, .hi  files are prepared once
(Why are you saying `to wait that long' ?).
Then, thousands of times  ghci  is run that uses the ready library 
optimized code and loads smaller examples to interptret.
(I never tried -O to compile for  ghci  because so far we are 
considering the bugs made by  ghci  using the code produced with
-Onot). 
Typical example: the product of concrete matrices  matrMul M N  
is called for several M, N - in interpreted mode.
But  matrMul  refers to the application library code compiled (once)
with -O.
Is this possible? 
Please, document these questions in the manual. 

-----------------
Serge Mechveliani
[EMAIL PROTECTED]

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to