More efficient grid_match example.