Pre-calculate marker counters (emptyCount, etc) instead of doing it everytime the funcs are called. Now only 1x slower than the best one, instead of 2x.