amnh / PCG

𝙋𝙝𝙮𝙡𝙤𝙜𝙚𝙣𝙚𝙩𝙞𝙘 𝘾𝙤𝙢𝙥𝙤𝙣𝙚𝙣𝙩 𝙂𝙧𝙖𝙥𝙝 ⸺ Haskell program and libraries for general phylogenetic graph search
28 stars 1 forks source link

Use compact regions for our search state. #43

Closed recursion-ninja closed 6 years ago

recursion-ninja commented 7 years ago

GHC 8.2.1 introduces the primitive memory management helper library known as "compact regions".

If we define our search state as a compact region, we will get the benefit of:

Boarders commented 6 years ago

There is a first draft approach here: https://github.com/amnh/PCG/tree/CompactExperiment

This currently returns: pcg: compaction failed: cannot compact functions

This is because some of the decoration fields have functions like:

symbolChangeMatrixData :: Word -> Word -> Word transitionCostMatrixData :: c -> c -> (c, Word)

It may still be possible to use compact regions by re-writing how the metric data of these types are stored in the decoration.

recursion-ninja commented 6 years ago

@Boarders I believe that is has been implemented. Should we close the issue?