D Concurrent GC

Leandro Lucarella luca at llucax.com.ar
Thu Oct 7 17:25:30 PDT 2010


Leandro Lucarella, el 10 de septiembre a las 09:26 me escribiste:
> Bernard Helyer, el 10 de septiembre a las 04:49 me escribiste:
> > Very nice. I've been reading your posts on this with interest.
> > 
> > How much work would be involved in porting this to druntime?
> 
> Is hard to tell since I didn't followed druntime development very
> closely lately, but both are based on the same code, so probably not too
> much work should be involved.

BTW, I just saw there were quite a few replies to this threads while my
internet connection was down for a couple of weeks (just after I posted
this), that I didn't received.

I'm sorry about the silence, I'll try to reply the things that might
still be of interest, and I'll take this opportunity to say that CDGC is
"finished", see the blog post for (a few) more details:
http://llucax.com.ar/blog/blog/post/-7454ab1d


Now the replies.

David Simcha asked:

> Been meaning to ask, what does this GC do with regard to precise
> scanning?  Is it substantially less conservative than the current D2
> GC?

Yes, if the compiler support is there. It uses the patch to DMD posted
by wm4 to scan the heap precisely. See bug 3463 for details:
http://d.puremagic.com/issues/show_bug.cgi?id=3463


Andrei Alexandrescu said:

> There's a discussion on digitalmars.D about a D program being slower
> than the equivalent Python script because of the GC. Would be a good
> test bed!
>
> http://rounin.livejournal.com/21815.html

I'll try it when I have some time. I wouldn't expect much improvement
because it only uses AAs that doesn't get scanned precisely yet (IIRC
from wm4 patch), but there are a few optimizations that could help with
dynamic arrays (which are also used frequently). We'll see :)

OTOH, Dil does a lot of string processing using too AAs and dynamic
arrays (AFAIK) and the improvement is huge using CGGC :). As a sample,
attached are the results for a Dil run generating all the Tango docs,
using 1 CPU (using more CPUs is a little faster), for the Tango basic GC
(TBGC) and several configurations of the CDGC. The file named "time"
measures the total run time (i.e. the throughput), the one named "stw"
measures the maximum stop-the-world pause (i.e. the time no thread can
run) and the file named "pause" measures the maximum time the GC will
actually block the program (i.e. the maximum real latency). All in
seconds, for 50 runs (the run time) and 20 runs (the pause time),
minimum is in black, maximum in white, and the mean is centered between
2 std deviations (in grey).


-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Hey you, out there on your own
Sitting naked by the phone
Would you touch me?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pause-dil-1cpu.pdf
Type: application/pdf
Size: 6018 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20101007/4b4babb2/attachment-0003.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stw-dil-1cpu.pdf
Type: application/pdf
Size: 5950 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20101007/4b4babb2/attachment-0004.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: time-dil-1cpu.pdf
Type: application/pdf
Size: 6672 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20101007/4b4babb2/attachment-0005.pdf>


More information about the Digitalmars-d-announce mailing list