llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.63k stars 11.83k forks source link

Code size regression due to improved std::sort #93703

Open hiraditya opened 4 months ago

hiraditya commented 4 months ago

Introsort was added to std::sort in https://reviews.llvm.org/D113413. There was a code size regression reported by @smeenai

""" I'm working on upgrading Meta's Android apps from libc++ 13 to libc++ 15, and seeing large size regressions caused by this change (similar to the Chrome case above). Was there any progress on figuring out how to offset the binary size increase? """

Creating an issue to keep track of this regression.

hiraditya commented 4 months ago

@agrieve also reported a code size regression in Chrome.

""" re: binary size - std::sort-related symbols make up more than 1% of Chrome's binary size (for arm32 Android at least). Any work to reduce the size overhead of std::sort() would be very welcome. From what I can tell, the main contributing factor is the templated nature of the function. It gets stamped out a lot of times, and in a way that identical-code-folding is often not applicable. """