# Julia slower than Matlab & Python? No

**URL:** <https://discourse.julialang.org/t/julia-slower-than-matlab-python-no/33128>\
**Category:** Performance\
**Tags:** economics, tensorflow, matlab, pytorch\
**Created:** [January 8, 2020, 11:57pm UTC](https://discourse.julialang.org/t/julia-slower-than-matlab-python-no/33128 "2020-01-08T23:57:37Z")\
**Posts on this page:** 1\
**Showing post:** 71

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 15, 2020, 1:45pm UTC](https://discourse.julialang.org/t/julia-slower-than-matlab-python-no/33128/71 "2020-01-15T13:45:52Z")

</div>

> [@Sijun](#):
>
> I’m curious why array indexing in Julia returns a copy by default rather than a view, unlike numpy.

See this discussion:

> [@Surprised that broadcast does not use views?](https://discourse.julialang.org/t/surprised-that-broadcast-does-not-use-views/25662):
>
> I am using a simple broadcast expression, and getting a surprising (to me) result depending on whether I use views or not. #setup a = rand(UInt64, 1000, 1000) b = rand(UInt64, 1000, 1000) c = rand(UInt64, 1000); Doing a broadcast op without views: @benchmark $c .= $a[10,:] .& $b[:,10] BenchmarkTools.Trial: memory estimate: 15.88 KiB allocs estimate: 2 -------------- minimum time: 3.607 μs (0.00% GC) Doing the op when employing views is much faster: @benchmark $c .= (@view $a…

TL;DR: it is not always better in terms of performance.

---

_[View the full topic](https://discourse.julialang.org/t/julia-slower-than-matlab-python-no/33128)._
