Localizing stats for less global memory accesses