[gclist] dead variables (gclist-digest V2 #119)

Henry G. Baker hbaker@netcom.com
Sun, 1 Feb 1998 10:09:07 -0800 (PST)

> Hans suggested that I might comment about the effect of dead variables. As
> previously posted, Ole Agesen, David Detlefs, and I found, in a forthcoming
> PLDI paper (yes! It was accepted!) that for a suite of about a dozen Java
> benchmark programs (patterned after SPEC programs), adding a dead variable
> analysis to an already accurate (i.e., non-conservative) collector reduce the
> heap time-space product by an average of about 8%, with every program showing
> perceptible improvement, and some showing dramatic improvement.
> ...
> -- Eliot

I discovered a similar thing when fiddling with 'linear/unique' types,
which are hyper about eliminating copies of things, and eliminating
references that aren't ever going to be used again.  One of the reasons
for the 'efficiency' of linear/unique types over the more usual nonlinear
types is that due to dead variable sloppiness, the size of the heap and
the GC effort is measurably increased.

I also pointed out in 1976 that lexical scoping reduced GC effort over
dynamic scoping due to the reduction in dead dynamic variables.

Henry Baker
www/ftp directory URL: