# Optimising superbee! function

**URL:** <https://discourse.julialang.org/t/optimising-superbee-function/112568>\
**Category:** Performance\
**Tags:** numerics\
**Created:** [April 5, 2024, 11:56am UTC](https://discourse.julialang.org/t/optimising-superbee-function/112568 "2024-04-05T11:56:17Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [April 5, 2024, 1:40pm UTC](https://discourse.julialang.org/t/optimising-superbee-function/112568/9 "2024-04-05T13:40:24Z")

</div>

I don’t think Julia notices this typically. This is called “common subexpression elimination” (CSE) and [per this thread](https://discourse.julialang.org/t/does-julia-do-common-subexpression-elimination/102901) 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.

---

_[View the full topic](https://discourse.julialang.org/t/optimising-superbee-function/112568)._
