by Someone · 1y ago · 0 comments
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.
Input: single .c file 8.5MB.
Output: 1.8MB object file.
Debug build took 1.5s.
Release build (O2) took about 6s.
That is about 3 orders of magntiude slower than what this machine is capable of in terms of IO from disk.