by daniel-levin · 5y ago · 0 comments
Most of the costs are not counted as runtime for your process, so benchmarks invariably appear to show GC as costing less overhead than it does. Among the costs, as with all the myriad varieties of caching done in modern systems, is that GC makes it hard to know the costs of design choices you make. Many of the costs are in making the caches less effective.
Most languages either don't have the concept of classes or ensure that invalidating references is an explicit operation (such as calling the destructor).