Optimizing an algorithm is a hard and sometimes counterintuitive
process. You might benchmark the following:
- Gnuradio's atan2 WITHOUT any Volk multiplications (just comment out
the volk mults in your block)
- The Volk multiplications WITHOUT Gnuradio's atan2 (just comment out
the atan2 in your block)
This will let you determine where the bottleneck is. In addition, try
running over a MUCH larger dataset. The clock resolution at <1ms is
not very good and the scheduler will have a correspondingly larger
effect at smaller timescales.
I think you'll find the atan2 part takes vastly longer than the
multiplications do, and that will be where you have to look for
performance improvements.
--n
Hi Nick,
Thank you for your advices! I will try benchmarking those two operations
separately and narrow down the problem. Besides, the explanation of the
effect scheduler have on clock resolution clears my question about the
inconsistency of the results.
There is just one thing that I'm not sure about. From the results of my
previous tests, I noticed that different number of data (ninput_items)
is fed to the work function every time (4096, 2048, etc). Therefore the
time of operation changes accordingly. So by "much larger dataset", do
you mean that providing much more data to the block and then summing up
the operation time for each buffer of data?
Thanks.
Terry
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio