π in Julia is not just a Float64 constant. It's evaluated to the accuracy required of the type you're using! https://julialang.org/blog/2017/03/piday
miniblog.
Related Posts
Rust is doing constant propagation on its internal IR before monomorphisation. This can give faster compiles because LLVM is given less code!
I used to think DCE and constant propagation were pointless: eg clean code shouldn't have dead sections. But inlining creates opportunities!
What does the 80/20 rule look like in compiler optimisation? I suspect basic constant propagation and DCE gets you a respectable speedup.