I had a buggy Red-Black tree implementation. It was computing correct results, but it was much slower than it should have been.