简体   繁体   中英

Good Performance on Octave or Matlab / Bad Performance on gcc

Hallo Everyone,

I am actually on topic of 3d-Scanning for robotic pick&place-applications.

To get a start I'm using an ICP-algorithmus to match the position of a reference object relative to the actual object. For this purpose I am using Octave/Matlab with the following code: http://www.mathworks.com/matlabcentral/fileexchange/12627-iterative-closest-point-method

After some tries the algorithm seems to generate satisfying accuracy in appropriate time. Matching of about 6000 to 6000 Data points costs with 100 iteration-loops about 15 seconds computation time.

Actually I'm trying to extract this matlab/octave-code to get it into my application to try a parallelism of the algorithm. When I'm running the unchanged code from my own c-application the computation time increases about 10 to 20 times. (Same datasets!)

If have turned on function inlining and the optimazion-level -O3. Are there any other optimizations octave does when generating a .oct-file? I've actually no idea why there is such a big difference in performance.

The ICP-algorithm massive does double addition, multiplication and division!

Thanks for all your help!

Greets, jodel

I expect that Octave, like Matlab, uses an implementation of BLAS which is tuned for the hardware you are using. Do you ? If not, this could account for the difference in speed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM