|
|
|
|
|
by schemescape
1138 days ago
|
|
As someone learning Common Lisp for fun and planning to use it in the web, I’m a little disturbed by the “we manually force garbage collection periodically” part of that article. I haven’t fully digested the commentary, so maybe I’m more concerned than necessary… |
|
Going longer between garbage collection cycles could be worse in terms of caching and paging. Marking the live objects allocated in that generation is about the same, since that doesn't grow, but there is more garbage to visit and sweep. Sweeping a smaller memory area more frequently is going to be faster than sweeping a larger area less frequently, from the point or view of caches and TLB.
(Regarding my remark about live objects; with larger collection cycles, they could be spread in a wider VM footprint, even if their quantity doesn't grow. The image has a kind of "GC working set"; longer intervals mean that there is a longer working set. The data being transformed cycles through more memory locations.)