Hacker News new | ask | show | jobs
by kibwen 2326 days ago
Those optimizations are happening on LLVM's end (though the higher-level language will have to expose sufficiently transparent abstractions to make these optimizations possible). I'd love to read a book on the optimization techniques that are implemented in LLVM/GCC to make transformations like this possible.
1 comments

Gotcha. Thanks. So presumably Clang would have done the same for C?
Easy to check, thanks to godbolt:

https://godbolt.org/z/SopXnf

Yes, and it's mentioned in the post that the C code was also brought into parity.
Yeah I saw that, but just wasn’t sure how using intrinsics played a role.