data:text/html,<img src="http://d37rcl8t6g8sj5.cloudfront.net/wp-content/uploads/NO_GC.gif" /> <img src="http://d37rcl8t6g8sj5.cloudfront.net/wp-content/uploads/REF_COUNT_GC.gif" /> <img src="http://d37rcl8t6g8sj5.cloudfront.net/wp-content/uploads/MARK_SWEEP_GC.gif" /> <img src="http://d37rcl8t6g8sj5.cloudfront.net/wp-content/uploads/MARK_COMPACT_GC.gif" /> <img src="http://d37rcl8t6g8sj5.cloudfront.net/wp-content/uploads/COPY_GC.gif" />
I had looping versions of the images, but changed them to stop because it seemed confusing to not clearly see the initial and ending states. Refreshing the page to replay an image seemed to work ok, but maybe not in all browsers?
The github project has versions animating longer runtime programs. They are linked from the smaller images in the blog post and might be useful to open side-by-side when reading the text.
In general though, the more frequently you GC, the more time you spend overall doing GC. This is part of why reference counted implementations tend to be slower (amortized) than other GC algorithms.
"If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell
Interestingly, this doesn't apply to Scala.