3 ms·
Most production GCs are accurate and the article’s position on conservative GC is a minority position.
by pizlonator 2y ago
Most production GCs are accurate and the article’s position on conservative GC is a minority position.
- mseepgood 2y agos/accurate/precise/
- pizlonator 2y agoNo. The literature uses “Accurate GC”, “Precise GC”, and “Exact GC” interchangeably. Famous paper on this that uses “accurate”: https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=db35502708be06db3bfdd26c685400f3e134fdd4 https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d... Paper that calls it “exact”: https://dl.acm.org/doi/10.1145/2660193.2660198 https://dl.acm.org/doi/10.1145/2660193.2660198
- samatman 2y agoAs the Fine Article mentions, the JavaScriptCore GC is conservative, and V8 is considering a switch. Someone reading your sentence might be at risk of conflating a minority position with a fringe one. Clearly this isn't the case here.
- pizlonator 2y agoI said minority, not fringe. But fringe isn’t far off. Among those who write GCs professionally, I was definitely on the fringe as an advocate for conservative-on-the-stack. (I wrote most of JSC’s GC and I was one of the folks pushing for it to remain conservative at a time when V8 was accurate and SpiderMonkey transitioned to being accurate. I like that folks are now acknowledging the good choice we made in JSC, but it was a fringe/minority choice at the time for sure, and it’s still a minority choice among high performance GCs.)
- samatman 2y agoI would say you're being a bit modest! JSC is deployed on hundreds of millions of devices, and if V8 does adopt a conservative GC strategy, that would be a comfortable majority of JavaScript engines making use of that approach. It goes to show that popularity is a poor measure of technical merit, and the fringe doesn't always stay that way.
- fweimer 2y agoSome are not. You can try this: diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index a2b6b979c1..d2f2852294 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -144,7 +144,7 @@ const ( // debugScanConservative enables debug logging for stack // frames that are scanned conservatively. - debugScanConservative = false + debugScanConservative = true // sweepMinHeapDistance is a lower bound on the heap distance // (in bytes) reserved for concurrent sweeping between GC And observe that Go scans a few stack frames conservatively. I think it only does this if a stack frame is preempted. Most frames are scanned precisely.