https://github.com/nicovank commented:

I stopped halfway, but a performance tip to save copies:
If the constructor or method is going to "own" the data: pass by value and move 
(some would recommend two overloads, IMO the extra verbosity is not worth the 
insignificant performance gain).

I wrote [a 
post](https://nvankempen.com/2022/09/13/cpp-when-to-pass-by-value.html) a while 
ago if you ever want more background.

https://github.com/llvm/llvm-project/pull/105893
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to