How to compute $\mathbf{X}^T \mathbf{X}$ efficiently for large $\mathbf{X}$?
"Blocked matrix multiplication" is one way to optimize matrix multiplication for memory access.

From "Using Blocking to Increase Temporal Locality" by Bryant and O’Hallaron (2012):


  Blocking a matrix multiply routine works by partitioning the matrices
  into submatrices and then exploiting the mathematical fact that these
  submatrices can be manipulated just like scalars.


"The cache performance and optimizations of blocked algorithms" by Lam, Rothbrg, and Wolf (1991):


  ...presents cache performance data for blocked programs and evaluates
  several optimizations to improve this performance.


More lecture notes:


Matrix Computations (CS 6210): Week 1 by David Bindel (accessed
Feb 23, 2016) 
CS 267 Applications of Parallel Computers Lecture 2:
Memory Hierarchies and Optimizing Matrix Multiplication by James
Demmel (accessed Feb 23, 2016)