Re:Perceus: Garbage Free Reference Counting with Reuse [pdf]
by bjourne on Saturday December 19, 2020 @02:07PM
(#25480160)
Always a catch with these zero-overhead refcounting schemes. If the programmer has to use some equivalent to weakrefs then how is this an improvement over existing schemes? The possibility of cyclic garbage to accumulate is a very big drawback in many applications.
Re:Perceus: Garbage Free Reference Counting with Reuse [pdf]
by studius on Saturday December 19, 2020 @12:07PM
(#25478883)
const is really popular in JS... (i.e. could they surreptitiously be taking on Orinoco?)
Re:Perceus: Garbage Free Reference Counting with Reuse [pdf]
by djwatson24 on Saturday December 19, 2020 @12:21PM
(#25479046)
I don’t think const or non const is the main issue- some data structures just require cycles like graphs or circular linked lists.
Re:Perceus: Garbage Free Reference Counting with Reuse [pdf]
by Jweb_Guru on Saturday December 19, 2020 @01:18PM
(#25479658)
I don't disagree, but I also suspect that a very large number of real world JavaScript applications have few to no application-induced cycles. I might even go further and say this extends beyond JavaScript--the most common reason I even define recursive data structures in a language like Rust is for AST-like data that almost invariably forms a tree.
Re:Perceus: Garbage Free Reference Counting with Reuse [pdf]
by studius on Saturday December 19, 2020 @12:43PM
(#25479281)
I supposed you could construct as dynamic and then make it constant? I wonder why that feature isn't seen in common languages, even though I know it sounds crazy.
Re:Perceus: Garbage Free Reference Counting with Reuse [pdf]
by vnorilo on Saturday December 19, 2020 @01:28PM
(#25479752)
Clojure has transient mutable collections that are designed to become persistent once "complete". [1] Some systems have made use of using reference count of one (unique owner) as permission to mutate, something that TFA generalizes as memory reuse.
“ In practice, mutable references are the main way to con- struct cyclic data. Since mutable references are uncommon in our setting, we leave the responsibility to the programmer to break cycles by explicitly clearing a reference cell that may be part of a cycle. ”