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