[Kevin Jacobs, on Neil's tuple-untracking patch]
Sorry, I wasn't very clear here. The patch _does_ fix the performance problem by untracking cycle-less tuples when we use the naive version of our code (i.e., the one that does not play with the garbage collector). However, the performance of the patched GC when compared to our GC-tuned code is very similar.
Then Neil's patch is doing all that we could wish of it in this case (you seem to have counted it as a strike against the patch that it didn't do better than you can by turning off gc by hand, but that's unrealistic if so), and then some:
The good news is that another (unrelated) part of our code just became about 20-40% faster with this patch, though I need to do some fairly major surgery to isolate why this is so.
That makes it a winner if it doesn't slow non-pathological cases "too much" (counting your cases as pathological, just because they are <wink>).