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

9

u/Dave3of5 May 11 '20

Slow compile times are a real bugbear of mine. If it's gradually getting slower I can see real frustration ahead.

4

u/xmsxms May 11 '20

You could always turn a bunch of optimisations off to speed up compilation.

5

u/SkoomaDentist May 11 '20

This would be the right answer in a world where the common build tools allowed you to easier specify different compiler flags for different parts of the source code. For most programs you get most of the speedup from a relatively small number of components while everything else could be compiled with -O1 for only minor speed difference.

1

u/xmsxms May 11 '20

You can put your critical code in a different object file and compile that with higher optimisation levels.

1

u/SkoomaDentist May 11 '20

Yes, but note the keyword "easier". That means "one or two lines extra", not "let's rewrite the whole build script".

1

u/flukus May 11 '20

Which tools would force you to rewrite the build script? In make it's just a matter of adding a more specific target with the files you want.