[vector] #32: Performance of concatMap and O2/Odph

vector vector at projects.haskell.org
Fri Oct 22 21:49:08 EDT 2010


#32: Performance of concatMap and O2/Odph
---------------------+------------------------------------------------------
Reporter:  choener   |        Owner:       
    Type:  defect    |       Status:  new  
Priority:  critical  |    Milestone:  0.7.1
 Version:  0.6       |   Resolution:       
Keywords:            |  
---------------------+------------------------------------------------------
Comment (by rl):

 This is all quite horrible. I rewrote `concatMap` such that `good` has the
 same performance with 7.0 as with 6.12.3 but now `bad` is about 10x slower
 than `good` again. I found one
 [http://hackage.haskell.org/trac/ghc/ticket/4428 GHC bug] which affects
 `concatMap` but working around it doesn't help with `bad`. The problem
 seems to be that `bad`'s loop uses `i`, can't be floated out because of
 this and then GHC doesn't optimise it as well as `good`'s loop which
 ''is'' getting floated out. Why this affects optimisation is a bit of a
 mystery so far. Perhaps !SpecConstr is getting confused by something.

-- 
Ticket URL: <http://trac.haskell.org/vector/ticket/32#comment:5>
vector <http://trac.haskell.org/vector>
Package vector


More information about the vector mailing list