Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: Interesting code in http_client.impl.h, pass by value of objects

$
0
0
Hi G,

Yes I think a 'mess' of premature optimization and layer complexity has occurred here. What should really be done is just have the constructor take by const reference and avoid all these moves/copies. Then if this was a performance critical path a constructor overload taking by r-value reference could be added.

I have a change prepared that I'm running through review and testing that will make the parameters all be const reference. It will be fixed in the 2.4.0 release. This is the cleanest option and allows for better future improvement.

Thanks for pointing out,
Steve

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>