News for hackers. Stuff that matters.
Re:Removing garbage collection from the Rust language by rayiner on Monday June 03, 2013 @10:51AM (#5813605)
A naive, thread-safe reference counter using atomic compare-swap is extremely expensive. On the best CPU's in the uncontended case it's 30-50 clock cycles. So modifying a single pointer field becomes a 100 clock cycle affair (decrement for the old value, increment for the new value).

Thread-safe deferred reference counting looks like GC.

Re:Removing garbage collection from the Rust language by Pxtl on Monday June 03, 2013 @01:32PM (#5814564)
Would auto pointers and weak references work better? I've always liked that paradigm...single transferable ownership just feels conceptually clean.