[PATCH] improve performance of std::allocator::deallocate
Pádraig Brady
pbrady@fb.com
Sat Feb 23 02:04:00 GMT 2019
Attached is a simple patch which has been extensively tested within
Facebook,
and is enabled by default in our code base.
Passing the size to the allocator allows it to optimize deallocation,
and this was seen to significantly reduce the work required in jemalloc,
with about 40% reduction in CPU cycles in the free path.
Note jemalloc >= 5.1 is required to fix a bug with 0 sizes.
cheers,
Pádraig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-std-allocator-deallocate-support-sized-deallocation.patch
Type: text/x-patch
Size: 1817 bytes
Desc: 0001-std-allocator-deallocate-support-sized-deallocation.patch
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20190223/f752a2dc/attachment.bin>
More information about the Libstdc++
mailing list