4 ms·
Does anyone using C++ for a real project actually enjoy 3-second compile times? It wasn't a great example to make their case (except in a narrow comparison to C
by simplestats 5y ago
Does anyone using C++ for a real project actually enjoy 3-second compile times? It wasn't a great example to make their case (except in a narrow comparison to C), but it doesn't make for a very realistic counter-point much either.
Compile times are definitely a headache for me.
- FpUser 5y agoI have decent size project and when I change something here and there it takes about that long to recompile and run. Full rebuild goes for longer but it is parallelized and is stile very reasonable.
- TaylorPhebillo 5y agoDo you mean as high as 3 seconds, or as low as 3 seconds? C++ compile times on a template heavy project I used recently were in the hours- you'd basically compile overnight and before you went to lunch.
- ncmncm 5y agoOnly if you are too masochistic to fix up your build.
- maccard 5y agoI'm sure projects like chromium and llvm would love for you to just fix their build times.
- tom_ 5y agoAnd Unreal Engine too, please.
- maccard 5y agoI used to work for Epic, and I did a good chunk of work on the game projects build times with reasonable success. Unfortunately I couldn't really change too much inside the engine because of backwards compatibility. Removing headers from other public interface headers has the possibility of breaking users code, which is a no-no so their hands are pretty tied. There are definitely some big wins to be had if they're willing to break back compat though!
- usefulcat 5y agoEven without that restriction it's not that easy. It generally comes down to a choice between: a) #include <vector> -- Lots of dependencies, but I know it works and I don't want to reinvent the wheel b) #include <my_vector.h> -- Ok, I'm going to reinvent the wheel, but at least my wheel might have slightly fewer dependencies. c) //#include <vector> // I'll just do without the wheel entirely
- maccard 5y agoWith ue4 that's not really the problem, it mostly falls under category b). The problem is that a bunch of stuff has unneeded module dependencies that hide the real dependency tree. Say a.h includes b.h but doesn't use anything from module B, but b.h includes SomeFundamentalHeader.h which a does need. The choice here is leave it alone or fix the dependency but break any user code that relies on the same behaviour. I did just that in a few modules that were new and off by default but good luck making a change like that in any commonly used modules.