On Wed, 14 Feb 2001 10:48:10 +0100, sperber(a)informatik.uni-tuebingen.de (Michael Sperber
[Mr. Preprocessor]) said:
I have no principal objection to a weak-list->list operation.
However, it may not be fast. I've thought of some way to cache the
result of this, but haven't come up with one which would not also
I am reminded of the story of the early 70's Fortran optimizer - a programmer
tightened up special case code and thereby introduced a bug. Upon analysis,
it turned out that the special case code was never *ever* called - it was
essentially dead code, but the optimization broke code paths that WERE used.
I say implement it slowly but bug-free, if at all. We'll put in caching
and the like when somebody notices it's slow. If skipping caching here
in code that nobody even *USES* as far as we know can result in benefits
for the GC code that *every single user* will depend on *heavily*, that's
a win. Even if the weak-list code ends up being 10x slower, if the GC
can run 10% faster as a result, we've won.
First rule of optimization: Optimize the actual hot spots.
--
Valdis Kletnieks
Operating Systems Analyst
Virginia Tech