Compact Region Short-Circuiting

Andrew Martin andrew.thaddeus at gmail.com
Thu May 11 12:51:16 UTC 2017


Nevermind. The docs for compactAdd say:

> This will help you avoid copying when the value contains pointers into
the compact region

I had missed that.


On Wed, May 10, 2017 at 9:43 PM, Andrew Martin <andrew.thaddeus at gmail.com>
wrote:

> In the paper on compact regions (http://ezyang.com/papers/ezyang15-cnf.pdf
> ),
> we find the following:
>
> > However, if we want to apply a functional update to this tree, we may
> > want to specify the already existing compact region so we can reuse any
> > already compacted shared data... appendCompact, like newCompact, fully
> > evaluates a; however, it copies the result into the same compact region
> > as Compact b. Additionally, it short-circuits the evaluation/copying
> > process if a subgraph is already in the target compact region.
>
> However, in the docs for both the compact library and the ghc-compact
> library (still only on phabricator), this short-circuiting behavior is
> not mentioned. Did this end up in the final implementation on was it
> dropped? If it is implemented, I think it's worth mentioning in the
> docs for `compactAdd`.
>
> -Andrew Martin
>



-- 
-Andrew Thaddeus Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170511/a66513e7/attachment.html>


More information about the Libraries mailing list