duck-lang icon indicating copy to clipboard operation
duck-lang copied to clipboard

Improve the garbage collector.

Open gregtour opened this issue 9 years ago • 0 comments

https://github.com/gregtour/duck-lang/blob/master/duck/garbage.c#L6

Currently all of the GC data structures use an unsorted array/list for tracking data. This really makes the garbage collection sweep O(N^2) on top of the performance cost of completing a trace of the entire environment.

Additionally, the current tracing garbage collector is a stop-the-world collector. In the future, using some sort of tri-color graph to interrupt garbage collection could be useful for maintaining realtime performance for applications, when necessary (like interactive graphical applications).

gregtour avatar Aug 14 '15 18:08 gregtour