Re:Go GC: Solving the Latency Problem in Go 1.5
by the8472 on Thursday July 09, 2015 @08:31AM
(#9857428)
One thing that's rather difficult to implement without GCs are concurrent, wait-free data structures.
When you have multiple threads trying to unlink structural elements they have to back off and leave the work to other threads, otherwise you will get contention on the pointers which breaks the wait-free guarantee.
With a GC you can just null out a reference. Or let another thread do the nulling.
With manual memory management you can only call free once.
With ownership a thread cannot back off because it has taken ownership for that chunk of the data structure.
With reference counting you either have contention from the count fields or vastly inflated footprint for striped counters.
When you have multiple threads trying to unlink structural elements they have to back off and leave the work to other threads, otherwise you will get contention on the pointers which breaks the wait-free guarantee.
With a GC you can just null out a reference. Or let another thread do the nulling.
With manual memory management you can only call free once. With ownership a thread cannot back off because it has taken ownership for that chunk of the data structure. With reference counting you either have contention from the count fields or vastly inflated footprint for striped counters.