|
|
|
|
|
by Someone
863 days ago
|
|
> A well written GC has the same throughout (or higher) than reference counting for most applications Reference counting has its own problems. The true comparison should be with code that (mostly) doesn’t do reference counting. Then, the claim still holds, IF you give your process enough memory. https://cse.buffalo.edu/~mhertz/gcmalloc-oopsla-2005.pdf: “with five times as much memory, an Appel-style generational collector with a non- copying mature space matches the performance of reachability- based explicit memory management. With only three times as much memory, the collector runs on average 17% slower than explicit memory management. However, with only twice as much memory, garbage collection degrades performance by nearly 70%. When physical memory is scarce, paging causes garbage collection to run an order of magnitude slower than explicit memory management.” That paper is old and garbage collectors have improved, but I think there typically still is a factor of 2 to 3. Would love to see a comparison between modern recounting and modern GC, though. Static code analysis can avoid a lot of recount updates and creation of garbage. |
|