# Julia Beginner (from Python): Numba outperforms Julia in rewrite. Any tips to improve performance?

**URL:** <https://discourse.julialang.org/t/julia-beginner-from-python-numba-outperforms-julia-in-rewrite-any-tips-to-improve-performance/66414>\
**Category:** Performance\
**Tags:** benchmark, python, tullio, loopvectorization\
**Created:** [August 15, 2021, 12:00am UTC](https://discourse.julialang.org/t/julia-beginner-from-python-numba-outperforms-julia-in-rewrite-any-tips-to-improve-performance/66414 "2021-08-15T00:00:50Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 15, 2021, 12:45pm UTC](https://discourse.julialang.org/t/julia-beginner-from-python-numba-outperforms-julia-in-rewrite-any-tips-to-improve-performance/66414/11 "2021-08-15T12:45:11Z")

</div>

As I commented in another thread, micro-optimizing a single vectorized function that does a single operation (sums the `sqrt` of array elements in your case) is not really the best way to get performance improvements:

> [@Comparing Numba and Julia for a complex matrix computation](https://discourse.julialang.org/t/comparing-numba-and-julia-for-a-complex-matrix-computation/63703/3):
>
> I should add that this is almost certainly the wrong way to go about getting performance improvements. “Highly optimized” code in Python usually means code that is “vectorized” as much as possible — broken into a series of relatively simple array operations that can individually call fast library operations. (For example, calling atan on a bunch of numbers in your code above.) You can write the same sort of code in Julia, of course, but it won’t be magically faster than Numpy — there’s no s…

---

_[View the full topic](https://discourse.julialang.org/t/julia-beginner-from-python-numba-outperforms-julia-in-rewrite-any-tips-to-improve-performance/66414)._
