2 ms·
Tbh, I'm not sure about this GC-purism. I've encountered tons of high-end C++ that's absolutely full of smart pointers, which is a form of GC. Rust has Rc<> and
by torginus 5y ago
Tbh, I'm not sure about this GC-purism. I've encountered tons of high-end C++ that's absolutely full of smart pointers, which is a form of GC. Rust has Rc<> and Arc<> as well. Having a a ref-counted GC instead of a tracing one doesn't seem like a step up in 'purity' to me.
- jeremyjh 5y agoRef-counting provides consistent performance - the costs are amortized smoothly over the operations. They aren't doing all this work for "purity".
- louthy 5y agoRef counting can also lead to memory leaks with circular references.
- deleted 5y ago[deleted]
- bjourne 5y agoPerformance of ref-counting is proportional to the size of the dead objects. Performance of tracing gc is proportional to the size of the alive objects. In other words, there are many real-world situations in which ref-counting pauses are much longer than tracing gc pauses.