[gclist] ref-counting performance cost

Henry G. Baker hbaker@netcom.com
Sun, 3 Sep 2000 08:47:32 -0700 (PDT)


> I've definitely seen memory, files, and windows dealt with using all
> three approaches more frequently than reference counting.  With good
> reason:  all three have much better performance than reference counting
> and are usually easier to implement correctly, even if they don't apply
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> to all circumstances.

The "hard" reality after the software industry's 40 years of
experience with both ref counting and gc is that the underlined
statement above is probably the most important issue of all.  No
matter how good a technique is in theory, it must provide benefits in
practise.  _Every_ ref counter I've ever come into contact with
requires a GC to back it up.  The best examples of ref counting --
Unix file systems -- prove this rule, because they always require some
sort of gc process (although they don't call it that!) to clean up
after crashes.