<br><br><div class="gmail_quote">On Wed, Nov 3, 2010 at 5:20 PM, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:andrei@erdani.com" target="_blank">andrei@erdani.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Thanks for the hard data! This is very useful.<br>
<br>
The article about atomic reference counting is interesting but mostly compares eager copy with atomic reference counting (I attach one of the result files for convenience). We're also interested in the penalty exacted by atomicity of reference counting when compared with unprotected reference counting. </blockquote>
<div><br>I want to know that too. I intend to do some tests later this week if I have time.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
(The trick of returning a smart proxy is clever but C++ specific.) </blockquote><div><br>If we cannot use that trick in D, then we need an alternative. Otherwise, COW is less attractive.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Also, if I understand things correctly, the article does not induce contention; it only measures uncontended operations.<br></blockquote><br>I think we can ignore the case of contention when more than one thread are modifying multiple instances sharing the same data. Such modifications inevitably lead to allocation of a copy in each contending thread, and creating the copies is a vastly more expensive operation than contended operations on the reference counter.<br>
<br>Cases of contended copy-construction, assignment and destruction are more interesting.<br><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Anyhow, the analysis of the class constructors in Qt is extremely relevant. Thanks again!<br></blockquote><div><br>You are welcome.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Andrei<div><br></div></blockquote><div> <br></div></div><br>