# 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:** 91

<div class="post-metadata">

**Author:** ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Post date:** [January 19, 2020, 1:38am UTC](https://discourse.julialang.org/t/julia-slower-than-matlab-python-no/33128/91 "2020-01-19T01:38:48Z")

</div>

@jlperla code combined from various users here on Discourse  
Julia [Original](https://github.com/vduarte/benchmarkingML/blob/master/LSMC/Julia.jl)  
Julia [Simple](https://github.com/azev77/LSMC-Option-Pricing-in-Julia/blob/master/AZ_vec.jl)  
Julia [Fastest](https://github.com/azev77/LSMC-Option-Pricing-in-Julia/blob/master/alvrg.jl)

“Simple” is much easier to understand than the original code & for every order size is faster than Matlab/Numpy/R.  
“Fastest” is even faster, but I don’t find it easy to follow.  
PS: I’m sure “Fastest” can be optimized a lot more  
PPS: I got PyTorch to work on my mac (not TF yet)  
“Fastest” is faster than PyTorch which is faster than “Simple”

Speed on my machine.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/a/8ab30c07875dad2bb1837487c6e1910ddf4ddbf9.png)

---

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