w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Estimating compile time?

For most reasonable programs built from reasonable sources on reasonable development machines (2+GHz, 4+GiB RAM), then answer for compiling a single source file should be 'a few seconds'. Anything in the minutes range usually indicates a problem, in my experience. The time taken to compile a complete program is then controlled by how many files there are to compile; it takes longer to compile 20,000 files than it does to compile 20 — roughly a thousand times as long, in fact. (Reasonable sources usually have source files under 10k lines and headers under about 1k lines — there are plenty of exceptions to either guideline, and both numbers are fairly generous.)

But it all depends. If your headers are on a network file system, compilation is likely to be slower than if they are on local file system — unless your local drive is slow, the network blazingly fast and backed by SSD, and ... oh, gosh; there are just so many factors that it is nigh-on impossible to give a good answer!





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.