[plt-scheme] minimizing garbage collection time
More GC questions... Here are typical running times for two of my
benchmark functions:
cpu time: 19300 real time: 19386 gc time: 18270
cpu time: 58860 real time: 60695 gc time: 53500
If I'm reading this right, this means that if I could turn off the
garbage collector, these would only take 1 and 5 seconds,
respectively. Is that right? Is it abnormal for garbage collection
to take 90-95% of the time?
What triggers the garbage collector? Is it whenever the allocation
pool is empty? Or is garbage collected as soon as it becomes garbage?
I have a lot of weak hash tables, but maybe I have some non-weak
tables that should also be weak-- would holding onto too many objects
that should otherwise be garbage cause the collector to do a lot of
extra traversals that it shouldn't need to do?
Any other tips for reducing GC time (or even just measuring it better)
would be appreciated.
--dougo at place.org