CPU usage by call of C++ code through system() on Linux

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

CPU usage by call of C++ code through system() on Linux

Andreas Stahel-5
Dear Octave Users

Maybe one of you can give me a hint on how to make my Octave code run faster.
Within a good size program (run time 40 sec) the command system() is used to call a C++ code.
The C++ code uses pthreads.
While the code is running htop show approximately 40% of load by the kernel on each CPU and 60% "normal" (user space?).

When running the same code in Matlab only the "normal"load shows and very little kernel load on the CPUs.
The computation time by Matlab is also only 60% of the time consumed by Octave (5.2.0)
The system is an Ubuntu 20.04 on a AMD Ryzen 3950X.

Any hints on what is slowing Octave down?

With best regards

Andreas

--
Andreas Stahel       E-Mail: Andreas.Stahel@[ANTI-SPAM]gmx.com