> the "header inclusion" way is an O(N²) algorithm
Maybe I don't know what they mean by this, but the header inclusion way is O(N*M), is it not? Where N is the number of source files and M is the average number of dependencies each has (as expressed as #includes).
If M is approaching N -- meaning everything depends on everything -- you probably have bigger problems than compile times.
That's also setting aside precompiled headers. Those wouldn't be N^2 either, even when the precompiled header needs to be precompiled.
Maybe I don't know what they mean by this, but the header inclusion way is O(N*M), is it not? Where N is the number of source files and M is the average number of dependencies each has (as expressed as #includes).
If M is approaching N -- meaning everything depends on everything -- you probably have bigger problems than compile times.
That's also setting aside precompiled headers. Those wouldn't be N^2 either, even when the precompiled header needs to be precompiled.