Running the code where the data already is saves network transfer: with data locality, you don't need to download each file before grepping.
Locality_of_reference#Matrix_multiplication explains how the cache miss penalty applies to optimizing e.g. matrix multiplication:
https://en.wikipedia.org/wiki/Locality_of_reference#Matrix_m...