Compact Region Short-Circuiting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Compact Region Short-Circuiting

Andrew Martin
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
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Compact Region Short-Circuiting

Andrew Martin
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 <[hidden email]> 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

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries