[vector] #22: Excessive memory allocation when using mutable vectors

vector vector at projects.haskell.org
Thu Oct 21 17:29:58 EDT 2010


#22: Excessive memory allocation when using mutable vectors
---------------------+------------------------------------------------------
Reporter:  babusri   |        Owner:         
    Type:  defect    |       Status:  closed 
Priority:  critical  |    Milestone:  0.7.1  
 Version:  0.6       |   Resolution:  invalid
Keywords:            |  
---------------------+------------------------------------------------------
Changes (by rl):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 It turns out that the program allocates huge thunks for `val+1`. Changing
 the last line to

 {{{
 W.write lfsr i $! val + 1
 }}}

 makes it run in constant memory as expected.

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


More information about the vector mailing list