0
$\begingroup$

I build a flowgraph in gnuradio, generated python code, change a little and run it using python. My question is, does building the flowgraph in cpp will provide better results (time)? (in other words does GIL and other stuff that make python slower also infect here?)(and if not i would like to read why)

$\endgroup$
0
$\begingroup$

Unless your flow graph contains signal processing blocks that you wrote in python (See the "embedded python block"), no, C++ will not make your flow graph be faster.

The reason is simple: Python is only used to set up the flow graph (read the generated python code!), i.e. to instantiate and connect the blocks together.

However, the GNU Radio scheduler and most blocks are running without interacting with the Python world at all. Hence, the GIL is needed at no point at all. Your Python calls top_block.run() and that's all that Python sees – the processing happens off-thread separately.

$\endgroup$
1
  • $\begingroup$ thank you very much $\endgroup$
    – Omer Zchut
    Oct 31 '20 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.