Thanks for this guys.  I made the change to a combination of the two "dumb" algorithms, since they are "correct by inspection".  I doubt the marginal speedup of going to the buffered case is really needed, and I'm a bit concerned about the edge case issues that Melanie pointed out, so I didn't want to risk it.  However, I did add a comment in the main code about the timing script, so if ever people want to revisit the issue, they'll know where to go for that.