That be much more CPU-bound. Yes - some optimization will do global traversals.
I wonder if javac/clang has the same characteristics as gcc.