Re: Build times of different projects
On 08/25/2013 12:05 PM, Ehsan Akhgari wrote: Note that the code itself (and not just its size) being compiled can also change the compilation time, as the compiler needs to perform things such as template instantiation, Koenig name look-ups, etc. Those factors will not change by reducing the #include dependencies. This tool only seems to measure the size of the .cpp file, not the size of the pre-processed source seen by the compiler. It would be interesting to see if the numbers are more consistent with that taken into account, or if it still varies wildly because of the features used by the code. -Mike ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Build times of different projects
On 2013-08-26 6:16 PM, Mike Shal wrote: On 08/25/2013 12:05 PM, Ehsan Akhgari wrote: Note that the code itself (and not just its size) being compiled can also change the compilation time, as the compiler needs to perform things such as template instantiation, Koenig name look-ups, etc. Those factors will not change by reducing the #include dependencies. This tool only seems to measure the size of the .cpp file, not the size of the pre-processed source seen by the compiler. It would be interesting to see if the numbers are more consistent with that taken into account, or if it still varies wildly because of the features used by the code. Oh, I didn't realize that! That makes their measurement pretty much useless. ;-) Cheers, Ehsan ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Build times of different projects
On Mon, Aug 26, 2013 at 06:23:09PM -0400, Ehsan Akhgari wrote: On 2013-08-26 6:16 PM, Mike Shal wrote: On 08/25/2013 12:05 PM, Ehsan Akhgari wrote: Note that the code itself (and not just its size) being compiled can also change the compilation time, as the compiler needs to perform things such as template instantiation, Koenig name look-ups, etc. Those factors will not change by reducing the #include dependencies. This tool only seems to measure the size of the .cpp file, not the size of the pre-processed source seen by the compiler. It would be interesting to see if the numbers are more consistent with that taken into account, or if it still varies wildly because of the features used by the code. Oh, I didn't realize that! That makes their measurement pretty much useless. ;-) Not necessarily. You can take that as being exactly the point being made, and it has some value. If your preprocessed source is 40 times bigger than the plain source, there might be something wrong. Mike ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Build times of different projects
On 8/26/13 6:31 PM, Mike Hommey wrote: Not necessarily. You can take that as being exactly the point being made, and it has some value. If your preprocessed source is 40 times bigger than the plain source, there might be something wrong. Mmm... We pretty commonly have files whose .i is 40x bigger than the .cpp. :( Luckily, cutting down on unnecessary includes helps a lot with this sort of thing. -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Build times of different projects
Note that the code itself (and not just its size) being compiled can also change the compilation time, as the compiler needs to perform things such as template instantiation, Koenig name look-ups, etc. Those factors will not change by reducing the #include dependencies. Cheers, -- Ehsan http://ehsanakhgari.org/ On Sat, Aug 24, 2013 at 6:17 AM, Nicholas Nethercote n.netherc...@gmail.com wrote: Hi, I just read this: http://voices.canonical.com/jussi.pakkanen/2013/08/23/comparing-build-speeds-of-different-code-bases/ The author compiled 10 different C++ projects and found that the number of lines compiled per second varied from 46 to 288. The final paragraph: What we can deduce from this experiment is that C++ compilation speed is a feature of the code base, not so much of the language or compiler. It also means that if your code base is a slow one, it is possible to make it compile up to 10 times faster without any external help. The tools to do it are simple: minimizing interdependencies and external deps. This is one of those things that is easy to do when starting anew but hard to retrofit to code bases that resemble a bowl of ramen. The payoff, however, is undeniable. The 10 times appears to be an exaggeration, and there's no evidence presented that minimizing interdependencies and external deps is truly responsible for the variation, but it's intriguing w.r.t. the Mozilla header clean-ups that are underway. Nick ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Build times of different projects
Hi, I just read this: http://voices.canonical.com/jussi.pakkanen/2013/08/23/comparing-build-speeds-of-different-code-bases/ The author compiled 10 different C++ projects and found that the number of lines compiled per second varied from 46 to 288. The final paragraph: What we can deduce from this experiment is that C++ compilation speed is a feature of the code base, not so much of the language or compiler. It also means that if your code base is a slow one, it is possible to make it compile up to 10 times faster without any external help. The tools to do it are simple: minimizing interdependencies and external deps. This is one of those things that is easy to do when starting anew but hard to retrofit to code bases that resemble a bowl of ramen. The payoff, however, is undeniable. The 10 times appears to be an exaggeration, and there's no evidence presented that minimizing interdependencies and external deps is truly responsible for the variation, but it's intriguing w.r.t. the Mozilla header clean-ups that are underway. Nick ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform