Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » Compilation speed concerns
Compilation speed concerns [message #14733] Tue, 11 March 2008 18:38 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
After using C/C++ compilation model for all this time and experience with different sizes projects, I think that C and especially C++ scales horribly.

I know that BLITZ speed up things a lot, but the numbers in general don't look that great. I've tested a small application (about 25KB code) written in U++, not during first compilation, but during repeated compilations while altering only parts. I got two case, which alternate during development: one in which compilation lasts for about 3 seconds and linking for about 3.5, and one where compilation is 1 second and linking is 1.5. It must be because of incremental linking or other optimizations. But once in a while, you will get the big number, and if BLITZ kicks in for multiple files, you will get some extra time here also. I've also tested compiling TheIDE, and compilation short times are 4 seconds compilation, 7 seconds link, and long times scale up nicely, up to 25 seconds link.

I know that these numbers don't mean much and are far from a real benchmark. And even 30 seconds compilation + link is not that much. But as programs grow, the numbers grow also. For example, I'm working now on something which takes between 5 and 10 minutes to build on any trivial modification. Of course, modifying a header file which is included in most packages will result in over an hour build time. This leads to a nice fear of modifying header files, which is done only on a real need basis, leading to some poor design decisions, abstraction breaking, etc.

The same conclusion can be drawn while compiling open source software. I remember waiting 2-3 hours for my K3b, only because there was some problem with the official binary for my distro. This is total time, and I don't know how much it would take for a minor modification + link, but still enough, I wager.

This big difference was easy to notice recently, because in order to learn a new language/library, I generally start porting something that I have written. This approach really works for me. And while I was porting a Delphi application, I noticed that even though my current code base is about 5 times smaller, the minimum compilation time under C++ (one file changed) is a lot longer than the maximal compilation time under Delphi (full rebuild after clean).

Also, I've written my college graduation thesis's application in D, and full compile + link after clean was done instantly (well not really instantly Smile, but fast enough that you barely managed to read the compilation message). Also, compiling only the std part of the standard D library (870KB of code) happens on the same machine in about 0.7 seconds, which is faster that the recompilation of a C++ file in the before mentioned 25KB test case.

Such examples make me really doubt the scalability of the C language family compiler performance.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Webtoolkit
Next Topic: Gold: GNU ld replacement in C++ up to 5x faster!
Goto Forum:
  


Current Time: Sun Apr 28 19:11:28 CEST 2024

Total time taken to generate the page: 0.02730 seconds