[vector] #51: optimization of fst . unzip . zip

vector vector at projects.haskell.org
Sun Aug 21 20:11:11 BST 2011

#51: optimization of fst . unzip . zip
Reporter:  choener                 |        Owner:     
    Type:  enhancement             |       Status:  new
Priority:  major                   |    Milestone:     
 Version:  0.7                     |   Resolution:     
Keywords:  code-path optimization  |  

Comment(by choener):

 Currently, what is going on is always:
 g i z = map (\k -> (k, work k)) $ enumFromN i z

 That is a generator produces indices 'k' which are paired with a function
 doing work. In the forward phase, we are only interested in the work:
 reduce i z = fold reducer neutral $ g i z

 In the backtrace, we need the index as well -- but do not care about
 xs <- toList $ g i z

 I'll  upload a number of libraries in the coming days. Once done I'll hope
 to have some time to optimize those.

Ticket URL: <http://trac.haskell.org/vector/ticket/51#comment:6>
vector <http://trac.haskell.org/vector>
Package vector

More information about the vector mailing list