3 ms·
Just FYI I've just updated the post with changes according to your comments. I was actually incorrect about views causing a slow-down (that was from a quick and
by cycomanic 6y ago
Just FYI I've just updated the post with changes according to your comments. I was actually incorrect about views causing a slow-down (that was from a quick and dirty test on my laptop), they result in some speed-up (at least on my desktop).
I appreciate your feedback, and I did not mean to be overly critical of Julia, I find it an interesting language. I might have sounded so critical, because I actually was expecting a bigger speed-up out of the box. I have read quite a view opinions that you get the speed of C with the convenience of Python, which probably set my expectations a bit too high.
I actually had similar "disappointment" the first time I used Cython, because using it and putting some type annotations in the function definitions did not speed things up at all. Goes to show you need to know what you're doing if you want performance.
- DNF2 6y agoI submitted an issue that gives a further >4x speedup with just simple straightforward code (no simd, fastmath or threads). It's important to make everything a view, and to remember the dots in the right places, otherwise this is quite straightforward. I believe you can get significant _further_ speedups with better simd vectorization and threading. I made this as simple as possible, to be similar to the python/cython code.