Fix a major source of compile-time slowness at -O0 -g by optimizing