On Thu, Jul 10, 2014 at 9:56 AM, Patrick Walton <pcwal...@mozilla.com>
wrote:

> On 7/9/14 2:48 PM, Robert O'Callahan wrote:
>
>> If you think so, then I think we *should* be considering GC+CC for Servo.
>>
>> Crazy idea: could it even make sense for JS GC to use a traced nursery
>> and a refcounted+CC tenured space?
>>
>
> This is more or less how RC-immix works, right?
>
> http://users.cecs.anu.edu.au/~steveb/downloads/pdf/rcix-oopsla-2013.pdf
>

Thanks for the reference, I hadn't read that.

Yes, RC-Immix captures the basic idea, but otherwise what I had in mind is
totally different from the RC-Immix design. One reason --- and this applies
to just about all academic research on refcounting techniques --- is that
it assumes references to any object can be created or destroyed by any
thread (because this is true in Java), so reference count updates must be
performed using atomic operations and therefore are incredibly expensive.
Thus, the entire design is driven by a need to avoid such updates (or
completely defer them to a stop-the-world phase). On the other hand, in
browsers (and Rust) we can statically distinguish thread-shared objects
from thread-local objects; the latter dominate completely and updating
their refcounts is almost free. So while academic research on refcounting
can give us useful ideas, their performance results and conclusions simply
don't apply.

The other issue is that RC-Immix performs cycle collection via full tracing
of the live objects whereas Gecko CC traces dead objects to find cycles
without incoming references. We believe the latter approach is much better,
at least for our purposes.

This suggests to me that, given RC-Immix can outperform other GCs for Java
(and I trust Steve and Kathryn more than the average researcher), for JS
and browsers which are much more RC-friendly, simpler RC schemes can
probably win big.

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to