On Thursday, 2 February 2012 at 01:27:44 UTC, bearophile wrote:
Richard Webb:

Parsing the file with DMD 2.057 takes ~25 seconds

Parsing the file with DMD 2.058(Git) takes ~6.1 seconds

Parsing the file with DMD 2.058, with the GC disabled during the LoadFile call, takes ~2.2 seconds.


For comparison, MSXML6 takes 1.6 seconds to load the same file.

Not too much time ago Python devs have added an heuristic to the Python GC (that is a reference counter + cycle breaker), it "switches off" if it detects the program is allocating many items in a short time. Is it possible to add something similar to the D GC?

Bye,
bearophile

I actually tried to add something like this a while back but I couldn't find a heuristic that worked reasonably well. The idea was just to create a timeout where the GC can't run for x milliseconds after it just ran.

Reply via email to