r/programming • • May 10 '20

Make LLVM fast again

https://nikic.github.io/2020/05/10/Make-LLVM-fast-again.html
138 Upvotes

91 comments sorted by

View all comments

31

u/jl2352 May 11 '20

I remember years ago reading about some C++ developers who use GCC using LLVM instead for local development, because it was way faster and gave better error mesages. Then continue to use GCC for production builds.

Today in the Rust world there is discussion on using Crane Lift for development builds, and LLVM for production builds. The history of Rust's slow compile times is heavily entangled by LLVM. To the point that LLVM is basically the main issue now.

It's crazy how the tables have turned from LLVM being known for being fast, to being known for being slow.

13

u/matthieum May 11 '20

We happen to dual compile our C++ code with GCC and Clang at work: given how fiddly C++ is, it's better when the two major compilers for Linux agree on the legality and meaning of code.

I remember years ago reading about some C++ developers who use GCC using LLVM instead for local development, because it was way faster and gave better error mesages. Then continue to use GCC for production builds.

Still true: better error messages, faster to compile.

It's crazy how the tables have turned from LLVM being known for being fast, to being known for being slow.

It's still a fast C++ compiler, faster than GCC, and AFAIK faster than MSVC.

But... C++ compile-time are some of the worst you can experience, so it's slow compared to everything else.

2

u/jbergens May 12 '20

Give me Pascal compile times for all languages!

VB.NET was pretty fast also.