[cpp-threads] Proposing a layered Thread API
Lawrence Crowl
lawrence.crowl at gmail.com
Thu Sep 7 01:31:34 BST 2006
On 9/3/06, Kevlin Henney <kevlin at curbralan.com> wrote:
> I also don't see why a reference count plus a copy will be expensive.
> There is no significant space overhead to a reference count and no
> additional allocations required and, unless someone is pathologically
> making copies all over the place, there is little cost associated with
> copying. Perhaps you could clarify where the reference count plus copy
> overhead is.
The expense is in the atomic increment and decrement operations. In
particular, non-atomic operations are just a few cycles acting on the
cache closest to the processor. The atomic operations need to coordinate
with other processors, and this can run to a hundred cycles.
--
Lawrence Crowl
More information about the cpp-threads
mailing list