[gclist] ref-counting performance cost
5 Sep 2000 11:21:38 -0500
>>>>> "Simon" == Simon Peyton-Jones <firstname.lastname@example.org> writes:
> source of space. As a result, allocation is typically done by an out-of-line
> call. (Correct me if I'm wrong here.)
Only for heap-allocated objects. C++ uses stack allocation rather heavily
and I expect Java compilers to make some effort at turning heap allocation into
This is partly due to the fact that they presume heap allocation to be costly.
SML/NJ does the extreme opposite, but it also has its own costs.
>>>>> Greg Morrisett <email@example.com> writes:
> They have the added advantage of not requiring twice the space
> as a copying collector and thus can do roughly half as many collections.
This does not have to be the case with a copying collector.
The train algorithm is probably the most popular example.
With such algorithms, you only need the "space doubling" for one of the
partitions of your memory. This can then be compared to the wastage
due to fragmentation.