Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SharedPtr: Remove explicit
detached
bool
`detach()` now fully releases the object, resulting in memory and performance savings. Profile before (compiling bootstrap 4): ``` flat flat% sum% cum cum% 24651348 6.97% 6.97% 24651348 6.97% [[kernel.kallsyms]] 20746241 5.87% 12.84% 20746241 5.87% Sass::SharedPtr::decRefCount 18401663 5.20% 18.04% 20420896 5.78% __libc_malloc 15205959 4.30% 22.34% 15205959 4.30% [libc-2.27.so] 12974307 3.67% 26.01% 14070189 3.98% _int_malloc 10958857 3.10% 29.11% 10958857 3.10% Sass::SharedPtr::incRefCount 9837672 2.78% 31.89% 18433250 5.21% cfree 8770779 2.48% 34.37% 8770779 2.48% Sass::Inspect::operator() ``` Profile after: ``` flat flat% sum% cum cum% 28346546 7.94% 7.94% 28346546 7.94% [[kernel.kallsyms]] 20920665 5.86% 13.80% 20920665 5.86% [libc-2.27.so] 13540151 3.79% 17.60% 14637507 4.10% __libc_malloc 13091487 3.67% 21.26% 13091487 3.67% Sass::SharedPtr::incRefCount 9864675 2.76% 24.03% 9864675 2.76% Sass::SharedPtr::decRefCount 8763387 2.46% 26.48% 8763387 2.46% _int_malloc 7676121 2.15% 28.63% 7676121 2.15% std::vector::_M_realloc_insert 6578211 1.84% 30.48% 6578211 1.84% __dynamic_cast ```
- Loading branch information