Wasteful area is one of the metrics of all time. I don't think there's a way to make it loop at a cost this low? Though my solution is definitely slow.