0

I have a segmentation algorithm written in C/C++ that makes extensive use of C pointers, in order to access linked lists of structures, which are calloc'ed in the beginning of the programme.

This algorithm takes about 3 sec. to run on Ubuntu 14.04, gcc 4.8.2. It also uses OpenCV 2.4.8.

The algorithm is meant to be embedded within a library of OpenFX, so that this library can be added as plug-in to software suites, like Natron.

When executed as a plug-in of a host, on SUSE, gcc 4.3.2, the very same method with the same inputs takes 12 sec. to execute. I've been debugging and can't figure out why it takes so long, when executed within OpenFX. My strongest guess is that OpenFX handles differently the access to memory and that makes the execution of the algorithm slower.

Could anyone give me any clue? Please let me know if you need further information.

capstain
  • 85
  • 1
  • 9
  • Did you ever find the cause of this? If not, I'd suggest adding profiling around calls so you can determine if the extra time is in your code or the host. I can't think of anything that would make the memory accesses themselves slower, unless it was paged out memory. I'd also try other OpenFX hosts to see what happens there. – Dithermaster Apr 12 '16 at 20:30
  • I didn't find it conclusively, but by other works (with other OpenFX hosts as well) I figured out that the host adds very little overhead, so the difference must come from the different cpu models. – capstain Apr 14 '16 at 10:27

0 Answers0