sauce icon indicating copy to clipboard operation
sauce copied to clipboard

std::string and shared_ptr instances are almost always passed by value

Open mgerhardy opened this issue 7 years ago • 1 comments

... forcing a new allocation for each function call and for the shared_ptr an increase of the atomic value each time you pass it by value. They should almost all be passed by reference to reduce memory and atomic operations.

mgerhardy avatar Aug 24 '16 20:08 mgerhardy

Hello!

I'm always happy to look at pull requests, but unless there is a demonstrable bug I probably won't get to this myself for a while.

Hopefully the dev environment will be portable enough that, if you care to try your hand, it should not be too hard to get started.

phs avatar Aug 26 '16 22:08 phs