# Can the compiler automatically optimize this code?

**URL:** <https://discourse.julialang.org/t/can-the-compiler-automatically-optimize-this-code/18924>\
**Category:** General Usage\
**Created:** [December 22, 2018, 3:57pm UTC](https://discourse.julialang.org/t/can-the-compiler-automatically-optimize-this-code/18924 "2018-12-22T15:57:28Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Seif\_Shebl](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Post date:** [December 22, 2018, 8:34pm UTC](https://discourse.julialang.org/t/can-the-compiler-automatically-optimize-this-code/18924/7 "2018-12-22T20:34:49Z")

</div>

If I get it correctly, I think it will not give the exact same result as sum(array), [see this for example](https://discourse.julialang.org/t/imprecision-of-mean-over-iterators-of-large-vectors/18759).

---

_[View the full topic](https://discourse.julialang.org/t/can-the-compiler-automatically-optimize-this-code/18924)._
