In particular, if all your code is basically:

    C = A*B
    U, S, V = svd(C)
    result = V'*x

then it's also the case that Julia will not provide any kind of "special" 
benefit---Matlab is just as good as Julia at linear algebra and a few other 
operations, as both simply call out to other routines for most operations.

Best,
--Tim

On Friday, June 12, 2015 11:37:44 AM Stefan Karpinski wrote:
> By far the most likely issue is that you're doing everything in global
> scope. The next most likely problem is that you have some type
> stability/predictability issues. And of course, it's always possible that
> you have code that Matlab is really fast at; for some problems it's not
> possible to do much better than a well-written vectorized code that
> leverages fast kernels.
> 
> On Fri, Jun 12, 2015 at 11:31 AM, Spencer Russell <[email protected]> wrote:
> >  There are a bunch of useful tips for making your Julia code faster here:
> > http://docs.julialang.org/en/release-0.3/manual/performance-tips/
> > 
> > There tends to be a lot of discussion on the list on relative performance
> > between Julia and other languages, and the core team keeps track of
> > performance issues very carefully, so it's definitely not just a case of
> > nobody noticing that Julia is actually slower than Matlab. :)
> > 
> > Most likely there are things you can do in your Julia code to speed it up
> > (sometimes by orders of magnitude), though I'm sure there are specific
> > cases where optimized Matlab code could beat out optimized Julia code, or
> > at least where the performance is equivalent.
> > 
> > It's also worth noting that often if you take Matlab code that's pretty
> > well-written and port it directly to Julia you'll see worse performance,
> > because the things you do in Julia to make your code fast are different
> > than the things you do in Matlab to make your code fast. Again the
> > performance tips linked above are super helpful.
> > 
> > -s
> > 
> > 
> > On Fri, Jun 12, 2015, at 04:26 AM, [email protected] wrote:
> > 
> > Without a specific example it's hard to say anything. Matlab can be faster
> > for some cases, but Julia should be faster in many cases, if you write
> > your
> > code correctly.

Reply via email to