Curious, try putting this at the start of your "processing":

$START = @TICKS

then put this after all your group checking is done:

? "Elapsed = " + (@TICKS - $START)

this will give you the total millsecs processing. Whats the time ? We can use this to benchmark any improvements.