Re:Introducing Swift
by pohl on Tuesday June 03, 2014 @08:58AM
(#7839823)
Wouldn't a lot of that be mitigated, though, by using tagged pointers in place of RC structs where possible? Seems like an obvious optimization.
[ Parent
| on HN ]
Not really sure what the tag in the pointer would be used for. Could you give an example.
In general, reference counting has the problem that it needs to update the reference count. If you have a read-only data-structure these updates to the references will introduce writes that may severely impact performance since a write introduces cache consistency communication, while reads are communication-free.