Added profiling code for norms.