There are multiple improvements that could be made to same_diff_mex which are documented in the code.
There are multiple improvements that could be made to same_diff_mex which are documented in the code.