News for hackers. Stuff that matters.
Re:2017 Rust Roadmap by naasking on Saturday October 22, 2016 @08:03AM (#12768339)
> When people (rightly) talk about how much slower reference counting is than tracing GC, they're almost always talking about either thread-safe tracing GC vs. thread-safe reference counting or single-threaded tracing GC vs. single-threaded reference counting.

Reference counting has always been slower, even in single-threaded cases. This should be obvious because pure reference counting requires modifying counts whenever locals are assigned, which happen orders of magnitude more often than main memory updates, and now each local assignment requires touching main memory too.

As soon as you defer these updates somehow to recover that cost, you've introduced partial tracing. You can find papers from way back acknowledging this overhead, and suggesting optimizations [1].

[1] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.25.9...

Re:2017 Rust Roadmap by pcwalton on Saturday October 22, 2016 @01:18PM (#12769542)
> This should be obvious because pure reference counting requires modifying counts whenever locals are assigned, which happen orders of magnitude more often than main memory updates, and now each local assignment requires touching main memory too.

I guess so, but it's worth noting that this isn't the case in Rust, because Rc benefits from move semantics. Most assignments don't touch the reference counts at all.

Re:2017 Rust Roadmap by naasking on Sunday October 23, 2016 @08:27AM (#12773256)
Right, Rust's borrowing is like the optimization link I provided, just slightly less general IIRC.