Re:The Garbage Collection Handbook, 2nd Edition
by NobleExpress on Saturday April 08, 2023 @01:39PM
(#35495698)
Yes and no. LXR is a highly optimized deferred and coalesced reference counting (amongst many other optimizations) GC and it looks nothing like the RC implementations you see in other languages like Python, Nim, Swift, etc. So yes, reference counting can be performant, _but_ only if you are using a deferred and coalesced implementation as otherwise the simple implementation requires atomic operations (though compilers could optimize it to use non-atomic operations when it's sure semantics are preserved).
[ Parent
| on HN ]
Re:The Garbage Collection Handbook, 2nd Edition
by vlovich123 on Saturday April 08, 2023 @07:32PM
(#35498656)
Rust doesn’t use multi threaded Rc unless you actually need to send it across threads.
Re:The Garbage Collection Handbook, 2nd Edition
by NobleExpress on Saturday April 08, 2023 @08:01PM
(#35498839)
I'm aware. Rust isn't a conventional "managed language" which is why I consciously omitted it from the above list. In an increasingly multi-threaded world, you just have to use the synchronized version of RC (aka Arc<T> in Rust).