logoalt Hacker News

cogman10yesterday at 3:47 PM1 replyview on HN

There are 2 unavoidable atomic updates for RC, the allocation and the free event. That alone will significantly increase the amount of traffic per thread back to main memory.

A lifetime system could possibly eliminate those, but it'd be hard to add to the JVM at this point. The JVM sort of has it in terms of escape analysis, but that's notoriously easy to defeat with pretty typical java code.


Replies

ridiculous_fishyesterday at 8:27 PM

Why would an allocation require an atomic write for a reference count?

Swift routinely optimizes out reference count traffic.

show 1 reply