Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1944 (closed enhancement: fixed)

Opened 14 years ago

Last modified 14 years ago

GC speedups

Reported by: winterwar Assigned to: community
Priority: normal Milestone: 1.0
Component: Tango Version: trunk
Keywords: Cc:

Description

Two patches that speed up the GC.

The first patch is just backported from druntime (http://dsource.org/projects/druntime/changeset/276) (plus I took the liberty to do a minor edit in the weakpointer code).

The second patch makes mark() recursive. This reduces the number of times the code loops over the scan bits yet again. The recursion depth is limited by a constant (which I set to 50).

Attachments

patch1 (9.7 kB) - added by winterwar on 06/24/10 15:03:24.
backport from druntime
patch2 (2.4 kB) - added by winterwar on 06/24/10 15:03:54.
make mark recursive

Change History

06/24/10 15:03:24 changed by winterwar

  • attachment patch1 added.

backport from druntime

06/24/10 15:03:54 changed by winterwar

  • attachment patch2 added.

make mark recursive

06/24/10 15:05:23 changed by winterwar

  • type changed from defect to enhancement.

PS: these patches should be tested well. In my own tests, the time spent in the GC collecting phase was halfed in the best case.

06/24/10 15:08:15 changed by winterwar

PPS: the GC, or at least gcx.d, should REALLY be compiled with -O -inline -release. That brings an additional 50% speedup.

06/29/10 11:27:58 changed by mwarning

Have you had a look at 277 and 275? Can it be applied as well?

06/30/10 09:02:33 changed by mwarning

Ok, druntime changesets 277 and 275 are included in the patch.

08/20/10 14:53:07 changed by winterwar

I consider patch2 deprecated; it's probably a bad idea and would interfere with other GC improvements.

08/20/10 19:18:35 changed by mwarning

  • status changed from new to closed.
  • resolution set to fixed.

(In [5529]) fixes #1944 :: GC speedups, applies druntime changesets 275, 276 and 277; thanks wm4

08/20/10 19:21:19 changed by mwarning

patch2 was omitted from the commit.