I used @time laplace(del_field, field) to time it.
At the same time, for a 1-d array vectorization can be much faster.
Is the Julia community planning to write loops for anything complicated, or will this be fixed for 1.0?
56% slower is likely due to bounds checking. I'm happy we could get this faster relatively easily, but we should, as we improve various things, not need quite as much tinkering to get comparable performance. It's nice that the tinkering is a) possible and b) relatively simple and transparent, but it would be even better if no tinkering were required at all.
Hi,
I needed to implement a 3D Laplacian operator. I saw that in the tests/perf2 folder of Julia there is a 2D laplace example. I guess in that example they are solving Laplace's equation, rather than applying the Laplacian operator. But, the code pattern in these two cases seems similar to me.
I ran the tests/perf2 example, and in that example I get comparable run-times between the C and Julia versions. However, when I run my 3D Laplacian example, my C code is approximately 100X faster than my Julia code. I put my code into a gist:
https://gist.github.com/anonymous/5653687
When I run the laplace_bench.jl file, I get the following output on my computer:
Julia: elapsed time: 54.036786598 seconds
s. You guys work really fast!! For the record, here are the new timings: