For shapes [N,d] · [d,m] = [N,m]. Each output entry is a dot product of a row of X with a column of W. Cost: N·m dot products of length d. Total: O(N·m·d) multiply-adds.
BLAS libraries (OpenBLAS, MKL) implement this with cache-blocking, SIMD vectorization, and threading. ~10-100× faster than naive Python loops.