←back to thread

164 points mpweiher | 1 comments | | HN request time: 0s | source
Show context
testdelacc1 ◴[] No.45113380[source]
LLVM is the code generation backend used in several languages, like Rust and one of the many compilers for C and C++ (clang). Code generated by these compilers is considered “fast/performant” thanks to LLVM.

The problem with LLVM has always been that it takes a long time to produce code. The post in the link promises a new backend that produces a slower artifact, but does so 10-20x quicker. This is great for debug builds.

This doesn’t mean the compilation as a whole gets quicker. There are 3 steps in compilation

- Front end: transforms source code into an LLVM intermediation representation (IR)

- Backend: this is where LLVM comes in. It accepts LLVM IR and transforms it into machine code

- Linking: a separate program links the artifacts produced by LLVM.

How long does each step take? Really depends on the program we’re trying to compile. This blog post contains timings for one example program (https://blog.rust-lang.org/2023/11/09/parallel-rustc/) to give you an idea. It also depends on whether LLVM is asked to produce a debug build (not performant, but quicker to produce) or a release build (fully optimised, takes longer).

The 10-20x improvement described here doesn’t work yet for clang or rustc, and when it does it will only speed up the backend portion. Nevertheless, this is still an incredible win for compile times because the other two steps can be optimised independently. Great work by everyone involved.

replies(3): >>45113440 #>>45113555 #>>45113671 #
ObscureScience ◴[] No.45113555[source]
[flagged]
replies(2): >>45113655 #>>45113984 #
testdelacc1 ◴[] No.45113655[source]
No it wasn’t. There’s no way I can prove that it wasn’t.

But I can prove that this comment wasn’t LLM generated -> fuck you.

(LLMs don’t swear)

replies(1): >>45113830 #
tialaramex ◴[] No.45113830[source]
Maybe HN should add "Don't accuse comments of being LLM generated" to the guidelines, because this sure seems like it'll be in the same category as people moaning that they were downvoted or more closely people saying "Have you read the link?"
replies(2): >>45113898 #>>45114009 #
1. tomhow ◴[] No.45114009{4}[source]
We've talked about this but we're not adding it to the guidelines. It's already covered indirectly by the established guidelines, and "case law" (in the form of moderator replies) makes it explicit.