> So why does it take minutes to compile?
I’m not claiming anything about it being I/O or compute bound, but you are missing some sources of I/O:
- the compiler reads many source files (e.g. headers) multiple times
- the compiler writes and then reads lots of intermediate data
- the OS may have to swap out memory
Also, there may be resource contention that makes the system do neither I/O nor compute for part of the build.