X-Git-Url: https://git.llucax.com/software/dgc/cdgc.git/blobdiff_plain/f79a30ddeee392a4f3d6aaf6ade2151a192097cc..c727ff521a84db2e82821a40131d91c983d9a040:/rt/gc/cdgc/bits.d?ds=inline diff --git a/rt/gc/cdgc/bits.d b/rt/gc/cdgc/bits.d index 520b780..4d25362 100644 --- a/rt/gc/cdgc/bits.d +++ b/rt/gc/cdgc/bits.d @@ -62,6 +62,10 @@ struct GCBits void Dtor() { + // Even when free() can be called with a null pointer, the extra call + // might be significant. On hard GC benchmarks making the test for null + // here (i.e. not making the call) can reduce the GC time by almost + // ~5%. if (data) { cstdlib.free(data); @@ -217,3 +221,6 @@ unittest b.Dtor(); } + + +// vim: set et sw=4 sts=4 :