I use cache style metrics for killing code too.<p>E.g. I might start a rewrite with:<p><pre><code>  #if BLEEDING_EDGE ...new code... #else ...old code... #endif
</code></pre>
Eventually moving the old code into a further removed #if 0 as the remaining bugs taper off (i.e. I&#x27;ll just fix them instead of reverting back to the old code for a milestone) before deleting the old code outright.<p>Much like evicting data from L1, L2, L3, and finally main memory.<p>Sometimes I&#x27;ll even write explicit comments to delete code by a certain date.