How long does it take to compile LLVM 17 on a Raspberry PI 5
So I got my Raspberry PI 5. And like in my previous post, I compiled LLVM 17 on the Raspberry PI 5, and have compared the compile speed versus the Raspberry PI 4.
I’m going to do the same steps:
- Compile LLVM using the default clang got via apt-get.
- Compile LLVM again using the clang we just built.
- And compile it a third time with the clang we built with our own clang (this step should be the most accurate picture of the difference in performance between the 4 and 5, because it should be the same binary compiling the same project).
I’ve used the same LLVM version as before just to make the comparisons accurate. There are a also few discrepencies on the image that I should call out - the Raspberry PI 4 image had Clang 11 as the default, whereas the Raspberry PI 5 has Clang 14. So I expect there to be a performance difference for the initial compile, but by the third go through we should be able to derive a good idea of the actual raw performance between the two boards. I’ve used the exact same MicroSD card, have the boards in the same location, and both are using ethernet (not that that will matter as I’m not timing the LLVM download from the interwebs, but consistency is key!).
I’m blown away by this. It is 2.82x faster to compile on the Raspberry PI 5 than the Raspberry PI 4. That’s amazing! I was expecting maybe a 50% improvement at 1.5x, but not nearly three times faster.
So if you have any performance sensitive workloads I highly recommend you upgrade to the new board. I’m glad I did!