[GHC] #9923: Offer copy-on-GC sliced arrays
GHC
ghc-devs at haskell.org
Wed Dec 24 20:24:09 UTC 2014
#9923: Offer copy-on-GC sliced arrays
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: simonmar
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 7.11
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
It's sometimes useful to split an array and send each part on to a
different computation. Slicing works very well for this sort of thing, as
long as both computations run to completion or become garbage at about the
same time. It can work badly, however, if one computation is completed or
abandoned and the other is retained—it may only hold a tiny slice, but
that's enough to keep the entire array alive.
The alternative, currently, is to copy the array to form two new arrays.
This gets rid of the retention problem, but introduces a performance
problem.
One way to solve these problems might be to offer sliced arrays supported
by the RTS. On collection, the garbage collector would copy each slice
separately, turning it into an independent (and independently collectible)
array.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9923>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list