huffyhenry/sync.soccer

Use unboxed array for the main matrix

huffyhenry opened this issue · 5 comments

Use unboxed array for the main matrix

The cause of the high memory footprint is "boxing": as I understand it, Haskell keeps the full computation of the array entries instead of the final value. Use unboxed arrays instead. Things to keep in mind:

  • Only simple types can be held in unboxed arrays, how do we keep an Entry? Do we need two arrays here?
  • We need to define the entries in the correct order - not hard, since N-W arrays can be filled row by row.