I have a function in my code which consumes almost 80% of the total run time. I converted this .m function into mex file through coder function which significantly improved the speed but my code is still not real-time. I am working on video processing and its kind of a requirement that my code should perform real-time operations. I am wondering if I implement the whole function in C++ and create a mex file from that, will it improve the speed? I need guidance regarding the technical differences between a mex file converted from matlab .m function and a mex file converted from C++ function.
MATLAB: Which kind of mex implementation is faster? C++ to mex file or .m function to mex
cmatlab codermexmex implementationperformance
Best Answer