Joe CookFor built-in types, you shouldn''t see any performance differencepassing by reference or value. In fact, for a class as simple as theone you sent, the function call itself should be optimized away by thecompiler entirely.Joe Cook 谢谢。但是,是否有关于是否通过 值或参考的指导方针?是一种或另一种是更好的风格?Thanks. But still, are there any guidelines on whether to pass byvalue or by reference? Is one or the other a "better style"? 这篇关于我是否通过构造函数中的值或引用传递int?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-18 14:43