| Here's a brief introduction. I intend to write up (on the performance
page on
| the wiki) a list of things we've done to improve the shootout entries.

Yes, do put what you wrote before on the Wiki.  (The performance-advice
page seems to have vanished but it should be on the user-documentation
wiki somewhere.  I'm sure we'll find it.)

| Multiple calls to sin. Hmm  :/ And similar for cos, as well as k*k.
Not sure
| why GHC isn't removing these (SimonM?), so let's do that by hand

GHC doesn't do full CSE.  It'd be a relatively easy pass for someone to
add, but it can cause space leaks.  And it can replace two
strictly-evaluated calls with one lazy thunk:
        let { x = case e of ....;  y = case e of .... } in ...
  ==>
        let { v = e; x = case v of ...; y = case v of ... } in ...
 

Instead GHC does "opportunistic CSE".  If you have 
        let x = e in .... let y = e in ....
then it'll discard the duplicate binding.  But that's very weak.  I've
added this to the GHC FAQ

Simon


_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to