Does the compiler optimize the function parameters passed by value?

前端 未结 5 1788
夕颜
夕颜 2020-12-05 18:55

Lets say I have a function where the parameter is passed by value instead of const-reference. Further, lets assume that only the value is used inside the function i.e. the f

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 19:23

    This post is an excellent reference to this kind of optimization: http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/

提交回复
热议问题