Lower resolutions should generate a lower number of count cycles in comparison to spancount cycles. Is it also slower at higher resolutions?
And on a side note, that stippled version I've posted above is broken at the remainder ( if (spancount > 0) ) part.