<story><title>Boehm-Demers-Weiser conservative C/C++ Garbage Collector</title><url>https://hboehm.info/gc/</url></story><parent_chain></parent_chain><comment><author>Jeaye</author><text>I have been using the Boehm-Demers-Weiser GC for jank [1], the native Clojure dialect on LLVM with C++ interop. Since jank is a Clojure dialect, and Clojure is built primarily on persistent, immutable data structures, there are potentially a lot of references to objects, potentially cyclical, across many threads, and there&amp;#x27;s a lot of garbage being churned. I originally started with reference counting and RAII, using boost::intrusive_ptr and an atomic count. The GC was actually 2x faster, in the sequence benchmark I was trying to optimize.&lt;p&gt;At this point, jank is generally several times faster than the equivalent Clojure JVM code. I&amp;#x27;m sure there are better GCs out there, in terms of performance, and I have my eye on MMTK [2] for a future upgrade, but the fact that remains is this: the Boehm GC is stupid simple to integrate and it&amp;#x27;s surprisingly fast. Compare it to MPS, MMTK, and others and both the documentation and the actual dev work required are worlds apart.&lt;p&gt;For a project which needs a GC but doesn&amp;#x27;t need to pick the absolute fastest one first, it seems like the best option, based on my research and my experience.&lt;p&gt;1: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;jank-lang.org&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;jank-lang.org&amp;#x2F;&lt;/a&gt;&lt;p&gt;2: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.mmtk.io&amp;#x2F;code&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.mmtk.io&amp;#x2F;code&lt;/a&gt;</text></comment>
<story><title>Boehm-Demers-Weiser conservative C/C++ Garbage Collector</title><url>https://hboehm.info/gc/</url></story><parent_chain></parent_chain><comment><author>torginus</author><text>Ah the spectre of the 80s, most famously used by the ancient fork of Mono that Unity uses, leading to GC-pause induced stutters that have plagued gaming for over a decade.&lt;p&gt;I&amp;#x27;d estimate that the bad rap GC languages get can be traced back to this piece of code.</text></comment>