Simon P. Jones  <[EMAIL PROTECTED]>  writes

> Alas, all too true.  'SPECIALIZE instance' is ignored right now.
> We should produce a message to say so.
> 
> If this is really hitting someone's performance pls yell.


And what about  -optC-fshow-specializations  ?
It does not seem to show any specializations.
Though, one could try to see them via  -ddump-simpl.

It is hard to know whether the absence of 'SPECIALIZE instance' 
hits the performance - without applying this pragma.
At least, what is the difference between the specialization of a
polymorphic function and of a class instance? If one helps
performance, then another does as well.
I am going to run the examples with all specializations. Then, to
recompile the system adding the flag like   -fspecializeNot
(is there such thing?), re-run examples and see.

And getting to optimization flags, the *profiling* is desirable.
Otherwise, it is hard to decide what to inline or specialize.

I congratulate ghc on -Oing. -O started to work in ghc-4.02.
In my program, compiling everything with -O yielded 30% of average
performance.

Finally, here is an old question on optimizations. For

  data A = A1 | A2             deriving(Eq,Ord,Enum)
  data B = B1 | B2 ... | B50   deriving(Eq,Ord,Enum)

  data A' a b = A1' a b | A2' a b 
  data B' a b = B1' a b | B2' a b ... | B50' a b

would   (==), compare   perform on A as fast as on B ?
Similar question is on pattern matching:
  f (A2'  x y) = ...   --
  g (B20' x y) = ...   -- would they match equally fast? 


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

Reply via email to