Most likely you have a type problem. Have you tried the various tools: the 
profiler, Lint, TypeCheck. See 
http://docs.julialang.org/en/latest/manual/performance-tips/

--Tim

On Sunday, September 14, 2014 12:30:29 PM Zac wrote:
> Hi I'm trying to port some c++ code to julia for approximating functions on
> a sparse grid and have run into a strange 100x slow down that I can't work
> out. https://gist.github.com/Zac12345/3da7be1fe99681a5bd14 shows the julia
> code  and https://github.com/Zac12345/Sparse has the whole module (though
> building the shared library can be a faff)
> 
> Though the library uses multi-threading this tends to only give a 6-7x
> speedup.
> 
> Is there anything obvious I'm missing out on here?
> 
> ps: profiling shows most of the time is spend (obviously) in the innermost
> loop - line 39 of the gist - but a simple comparison of the julia/c++ basis
> functions shows the julia version to be considerably faster!
> 
> many thanks

Reply via email to