Hacker News new | ask | show | jobs
by matt42 2107 days ago
Great that C++ compiler teams are working on reducing C++ compile time. The next great feature I think would be a game changer is caching the result of compilation (templates and binary code). A fine grained cache acting at the level of a line (or a function if it's too hard) would save an incredible amount of time to C++ devs, while also simplifying build systems. This would also stop engineers from losing days trying to speedup their build.
3 comments

Such a compiler exists, it's called zapcc (was a fork of clang 3.something). Sadly it has been abandoned and never merged even though it was opensourced.
The github page states:

> When was the source last merged with LLVM trunk?

> This open-source release was last merged with LLVM 325000 on 2018-02-13.

We already had function level compilers back in the early days, Energize C++ and VA for C++ v4, but they were too resource hungry for what companies were willing to pay for and they died.

There is an Energize C++ demo floating around on YouTube.

does ccache or sccache help?

I rarely touch C / C++, but when I do I've been having to git bisect stuff. Having ccache in between has been invaluable in reducing the run time.