4 ms·
Generally speaking, clang produces much clearer C++ compile errors than gcc. I can't give any specific examples off the top of my head, but I've seen GCC emit h
by jcalvinowens 2y ago
Generally speaking, clang produces much clearer C++ compile errors than gcc. I can't give any specific examples off the top of my head, but I've seen GCC emit hundreds of lines of inscrutable errors where clang spits out one line that tells you exactly what is wrong.
- eru 2y agoThe very first entry in the competition is a good example already. You can try it in both g++ and clang++. Interesting, for the 'Biggest error, category Bare Hands' entry, clang++ gives me a much longer error message than g++: $ g++ var.c++ |& wc -c 8 810948 5670500 $ clang++ var.c++ |& wc -c 20 5232857 36625300 Clang++ has about 6.5 times as many characters in the error message as g++ here. Though looking at the actual error messages, that seems to be down to a deeper default maximum instantiation depth on clang++ (1024 there vs 900 in g++).
- IWeldMelons 2y agogcc still pruduces a tiny bit faster binaries in most cases, like ~10-20%.
- spookie 2y agoAlso, Clang has had more consistent L2 cache misses in my testing (C++). Which is funny, Rust is more in line with GCC on that regard.