
Thorsten Ottosen wrote:
Hi Boosters,
It seems to me that many other slightly larger types could benefit from pass by value. For example, I rarely write [...] With this in mind, I think we should consider changing the limit for param_type to sizeof(long double) or even 2*sizeof(int). Of course, we should only pass types with a trivial assignment operator by value.
By "trivial assignment operator", you really mean "trivial copy constructor", right? You might want the "by-value size limit" to be platform dependent. I can imagine that the limit for 64-bit systems could arguably be twice that for 32-bit systems. Do you find the same optimization opportunity when passing a pair<float,float> by value as you did for passing a double by value? - Jeff