It’s a shame, one of the standout feature of llvm/clang used to be that it was faster than GCC. Today, an optimized build with gcc is faster than a debug build with clang. I don’t know if a 10x improvement is feasible, though; tcc is between 10-20x faster than gcc and clang, and part of the reason is that it does a lot less. The architecture of such a compiler may by necessity be too generic.
Here’s a table listing build times for one of my projects with and without optimizations in gcc, clang, and tcc. Tcc w/optimizations shown only for completeness; the time isn’t appreciably different. 20 runs each.
┌─────────────────────────────┬──────────┬──────────┬──────────┬─────────┬────────────┬────────────┐
│ │Clang -O2 │Clang -O0 │GCC -O2 │GCC -O0 │TCC -O2 │TCC -O0 │
├─────────────────────────────┼──────────┼──────────┼──────────┼─────────┼────────────┼────────────┤
│Average time (s) │1.49 ±0.11│1.24 ±0.08│1.06 ±0.08│0.8 ±0.04│0.072 ±0.011│0.072 ±0.014│
├─────────────────────────────┼──────────┼──────────┼──────────┼─────────┼────────────┼────────────┤
│Speedup compared to clang -O2│ - │ 1.20 │ 1.40 │ 1.86 │ 20.59 │ 20.69 │
├─────────────────────────────┼──────────┼──────────┼──────────┼─────────┼────────────┼────────────┤
│Slowdown compared to TCC │ 20.68 │ 17.20 │ 17.72 │ 11.12 │ - │ - │
└─────────────────────────────┴──────────┴──────────┴──────────┴─────────┴────────────┴────────────┘