Optimising superbee! function

I don’t think Julia notices this typically. This is called “common subexpression elimination” (CSE) and per this thread Julia typically does not perform it. In this case maybe because if you check the assembly then everything is fully inlined and LLVM does CSE so there is a chance. I am not able to decipher the assembly well enough to see whether the multiplications are performed twice.