We could potentially reduce CPU and memory consumption by converting unique_ptr fields into bare fields, for the cases where unique_ptr lifetime is bound to the lifetime of their container.
My suspicion is that developers might be declaring unique_ptr fields out of habit and giving up some efficiency as a result.
This seems like a good candidate case for a custom static analysis module. Could be worth bringing up with the LLVM team or hacking out an example.
We could potentially reduce CPU and memory consumption by converting unique_ptr fields into bare fields, for the cases where unique_ptr lifetime is bound to the lifetime of their container.
My suspicion is that developers might be declaring unique_ptr fields out of habit and giving up some efficiency as a result, producing unnecessary mallocs and memory fragmentation.
This seems like a good candidate case for a custom static analysis module. Could be worth bringing up with the LLVM team or hacking out an example.
Comment 1 by kmarshall@chromium.org
, Apr 24 2017