About a week ago, I posted a questionnaire on Reddit on C++ and build speed. I wanted to know how much of a problem build speed was to C++ developers, and also see what other issues C++ developers encounter.
Additionally, I’m working on an application (still in the prototype phase, I don’t plan on publishing it any time soon) to improve build speed, and I wanted to see if people would be interested.
I had a total of 250 responses (that’s the maximum amount of free answers per month allowed on SurveyMoz). Since I left pretty much all of the responses as ‘optional’, not all results will add up to 250.
How are you involved in C++ development?
To start, let’s see what kind of developers we have on Reddit. Possible answers were ‘Professional software development’, ‘Projects in spare time’ and ‘Other’.
I analyzed ‘Other’ to see if I’d need to add any additional categories of developers. Turns out most of the people in ‘Other’ are students, so I added that category.
I also added a category ‘Professional and spare time’ to show the overlap.
As you can see, there’s a lot of overlap here. A lot of developers have side projects, work on open source, … Somewhat expected, I guess
What do you see as your biggest waste of time while developing in C++?
This question is the reason it took so long to analyze the data (well, that and ‘real life’). I hoped it would give a good overview of pain points in C++ development. I had to do a lot of cleanup and merging of results, and below are the top answers (five or more people mentioning the issue).
- Build time (both linking and compiling)
- Header files and the include system
- Unclear compiler warnings
- Lack of good libraries
- Bad tools or lack of tools (IDE’s, refactoring tools, compilers, static analysis, …)
- Boilerplate code
- Build reliability
- Legacy code
- Bad third-party libraries
I also got a few responses stating that I shouldn’t have asked this question, since the title of the questionnaire already pointed people towards build speed. That’s absolutely correct! In that sense, it’s indeed skewed towards build times. However, it shows a nice overview of other possible issues, so I think the question was still useful.
Which of the following tools or techniques do you use to improve build speed?
Lots of different tools are available to speed up builds. It turns out that most people stick to using only a few to improve build speed. Most people only need parallel builds, language techniques (like forward declarations, pimpl, …) and possibly precompiled headers to improve build speed.
Tools built specifically to improve build speed are used, but far less than I anticipated.
Additionally, ‘adding more hardware’ was an option I forgot Specifically mentioned there were SSD’s.
I also tried to correlate the people who mentioned build times with the tools used, to see if specific tools were used more on problematic builds. However, I didn’t see a correlation. Perhaps some people with those tools no longer have problematic builds, while others can only make their build times ‘less horrible’?
What are the development platforms you often use?
Who wins the big operating system war of 2014 amongst C++ developers?
Besides these, some operating systems mentioned (but only once or twice) were:
- ETS PharLap
- Game consoles
- Bare metal development
Someone also mentioned I should not talk about ‘Linux’, but instead about ‘GNU/Linux’ or ‘GNU + Linux’.
To be honest, I don’t really care what the exact name is, I’ll leave that to Wikipedia.
Are build speeds a significant issue for you and why?
This question is one that made me very curious. I had no idea if I was one of the only people with build speed issues, or if it was a common problem.
Also, I got to use a nice colourful pie chart!
A lot of people do find long builds to be a serious issue. Some of the comments mention:
- Turnaround time for development is terrible because of long builds
- Incremental builds (due to dependency issues in their build system) fail too often, causing people to use full builds, which take way too long
- Several developers have issues due to long link times, which are unavoidable during both full and incremental builds
On the other hand, quite a few comments mention simply doing other tasks while a build is ongoing.
How much (if anything) would you be willing to pay for a solution if it significantly speeds up your builds?
The most common response is simple: “I don’t want to pay!”
Additionally, plenty of people worry about caveats when using build acceleration tools, since they can have downsides (issues when compiling, build reliability, …).
People that do want to pay, vary a lot on price point. Now, I should mention beforehand: I don’t think all responses will be reliable, as quite a few were accompanied by ‘maybe’, or ‘I might pay’, …
Also, it’s a lot easier to say ‘I would pay X’ than to actually pay it. Meaning: some people who say they would pay, would probably back out if given the chance to pay for an actual application.
One last caveat: I simply went with the numbers without conversion (some gave euros, some dollars, some pounds). Additionally, some people gave ‘a couple of hundred’ as response, which is also a bit hard to quantify.
Anyways, here’s a nice chart to finish off this post:
Thanks again to everyone who participated in the questionnaire!