Profiling and optimizing clean_correspondence3.m
Huge bottleneck in get_dtw_matches_()
.
Wrote MEX version of get_dtw_matches_(), get_dtw_matches_horiz.c
. ~8x speedup
New bottlenecks
interp1
- linear interpolationcsaps
- spline smoothincan possibly eliminate some calls to interp1.
could mex projecion_error_hessian. should be a big win
DTW can be done in two passes, or mex'd
projection_error_hessian
Tried using Matlab's "Coder" feature to generate mex code automatically. The result was totally bloated (14 files!) and no faster than the matlab version. Next I tried hand-coding the mex, and its ~10x faster.
Posted by Kyle Simek