On Thu, Sep 17, 2015 at 11:26:17AM +0300, Dmitry Olshansky via Digitalmars-d wrote: > On 14-Sep-2015 21:47, H. S. Teoh via Digitalmars-d wrote: > >Over in the d.learn forum, somebody posted a question about poor > >performance in a text-parsing program. After a bit of profiling I > >discovered that reducing GC collection frequency (i.e., GC.disable() > >then manually call GC.collect() at some interval) improved program > >performance by about 20%. > > > > One thing that any remotely production-quality GC does is analyze the > result of collection with respect to minimal headroom - X % (typically > 30-50%). If we freed Y % of heap where Y < X, then the GC should > extend the heap so that it get within X % mark of free space in the > extended heap. [...]
Excellent idea. Sounds reasonably simple to implement, though I'm not exactly familiar with the current GC so I don't know if I'll be able to implement this myself... T -- Gone Chopin. Bach in a minuet.
