Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perceus: Garbage Free Reference Counting with Reuse [MS TR 2020] #63

Open
brianhempel opened this issue Dec 10, 2020 · 1 comment
Open

Comments

@brianhempel
Copy link
Contributor

brianhempel commented Dec 10, 2020

Perceus: Garbage Free Reference Counting with Reuse
Alex Reinking Ningning Xie Leonardo de Moura Daan Leijen
https://www.microsoft.com/en-us/research/uploads/prod/2020/11/perceus-tr-v1.pdf

We introduce Perceus, an algorithm for precise reference counting with
reuse and specialization. Starting from a functional core language with
explicit control-flow, Perceus emits precise reference counting
instructions such that programs are garbage free, where only live
references are retained. This enables further optimizations,
like reuse analysis that allows for guaranteed in-place updates at
runtime. This in turn enables a novel programming paradigm that we call
functional but in-place (FBIP). Much like tail-call optimization
enables writing loops with regular function calls, reuse analysis enables
writing in-place mutating algorithms in a purely functional way. We give
a novel formalization of reference counting in a linear resource
calculus, and prove that Perceus is sound and garbage free. We show
evidence that Perceus, as implemented in Koka, has good performance
and is competitive with other state-of-the-art memory collectors.

@brianhempel
Copy link
Contributor Author

Q: Does FBIP require reference counting? I imagine that escape analysis could yield similar gains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant