Sounds like an offense In practice I do not post optimization patches if they do not offer performance improvements. Plus, this patch allows you to have any visibility distances w/o need to play with MAX_NUMBER_OF_CELLS define.
So, if you want theory, draw a square 5x5 cells. Place a dot in central cell <- this is your player/mob/whatever. If you are familiar with current cell search system, you'll notice that with ALL_DISTRICT flag specified for cell search you ALWAYS visit 9 cells around object, and you are ALWAYS limited(!) to these 9 cells. Now, draw 2 squares with dot in central cell as its center:
1) small one which fits inside central square - here you can calculate benefits for small radiuses.
2) big one, which covers all 5x5 cells - here you can understand, why this algorithm works with any cell sizes.
Have fun torturing your brain