10 ms·
A bonus feature of reversible computing is that a lot of garbage collection becomes a lot easier. Do a bunch of computation, copy off the results you need long
by corysama 8y ago
A bonus feature of reversible computing is that a lot of garbage collection becomes a lot easier. Do a bunch of computation, copy off the results you need long term, unwind the computation. No need to track the unwound values’ lifetimes.
- _bxg1 8y agoI don't think this is analogous to immutable data structures.
- corysama 8y agoThat's not what I'm saying. Execute instructions. Some of those instructions effectively allocate memory. Reverse execution. Running backwards undoes the allocations.
- klyrs 8y ago... at the cost of erasing the result, and taking time proportional to the original computation? Clever optimization, but the net result seems suboptimal
- corysama 8y agoThe idea is that eventually we'll have to go reversible anyway. Computation will have to run twice in order to run at more than 2X the clock speed of running once. Getting easy garbage collection is a side effect, not a goal of the optimization. And, the result will have to be copied off before rewinding.