So I missed that our usage pattern, in one case, is a Reset(), Write(), Reset(), Write() loop, which still causes an allocation for the window on every iteration. This adds an ugly, nested if that fixes that. It's not super beautiful, but it's a huge win in terms of allocations for that pattern...
Coverage remained the same at 66.667% when pulling 9d57f4e5038de6e4177547daf3db4773d49c9961 on kastelo:reduceallocs2 into 001f23736d5530d53d1588d3c1127b68caee99af on chmduquesne:master.
So I missed that our usage pattern, in one case, is a Reset(), Write(), Reset(), Write() loop, which still causes an allocation for the window on every iteration. This adds an ugly, nested if that fixes that. It's not super beautiful, but it's a huge win in terms of allocations for that pattern...