The total time to solve a problem consists of:
T_total = T_design + T_programming + T_debugging + T_runtime
inputParser can reduce the programming time remarkably. It might waste many milliseconds, but if the function is called some hundred times only, this does not matter. Using an hour to write and test a variety of input arguments can be inefficient in comparison, even if the code consumes microseconds only. And if you have a bug in manual input parsing, which was not detected before delivering the software, the costs can be substantial.
The shorter the function and the more frequently it is called, the worse is the slowdown by inputParser. But even interp1 and polyfit need more time with checking the inputs than with the actual computations - without inputParser ...
댓글 수: 3
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/404173-why-does-matlab-has-inputparse-function-but-does-not-use-it-in-its-own-functions#comment_575356
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/404173-why-does-matlab-has-inputparse-function-but-does-not-use-it-in-its-own-functions#comment_575356
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/404173-why-does-matlab-has-inputparse-function-but-does-not-use-it-in-its-own-functions#comment_575364
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/404173-why-does-matlab-has-inputparse-function-but-does-not-use-it-in-its-own-functions#comment_575364
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/404173-why-does-matlab-has-inputparse-function-but-does-not-use-it-in-its-own-functions#comment_575384
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/404173-why-does-matlab-has-inputparse-function-but-does-not-use-it-in-its-own-functions#comment_575384
댓글을 달려면 로그인하십시오.