4 ms·
That's good. I still cannot see the repository, though. I may be looking in the wrong place. It's no problem being new to a language, I just found the conclusi
by DNF2 6y ago
That's good. I still cannot see the repository, though. I may be looking in the wrong place.
It's no problem being new to a language, I just found the conclusions as bit too 'conclusive', so to speak, in that case.
Views should definitely not slow this down, so there may be something off. Could you perhaps share some dummy input arrays? Can I generate them with rand, perhaps, if you can tell me the sizes?
- cycomanic 6y agoThe repository is here https://gitlab.com/Jochen/jochen.gitlab.io https://gitlab.com/Jochen/jochen.gitlab.io (you can find it under code in the navigation bar). The post is a jupyter notebook which can be found under content/blog Regarding dummy arrays, you can just generate random arrays of complex values, that should normally not cause issues (although obviously the filter does not converge to anything). The size I used for the demo is (2, 200 000), i.e. 2 polarisations and 100 000 symbols 2 times oversampled
- DNF2 6y agoI had the impression that the inputs were one 2D and one 3D array. Are they both complex? Also it seems like they did not have the same sizes, as well as dimensionalities.
- cycomanic 6y agoAh yes sorry the filter array (wxy) is a 3d array of shape (2,2,21) initialised to 0 with the wxy[0,0, 21//2]=1 and wxy[1,1,21/2] =1. Which corresponds to a perfect impulse response function and wxy should also be complex (at least in this implementation of the adaptive filter).
- cycomanic 6y agoJust 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.