Started optimizing

added breaks and continues to speed up the process.  Could be faster if
they didn't have to check those, but it is much faster as is.
Significantly faster

Used a few breaks/continues to speed the process along, and it is far
faster than it used to be.  Still could be sped up a little bit, but it
is good enough for the time being.  Not quite the solution I had in mind
but far simpler.