Modern mobile applications have grown rapidly in binary size, which restricts user growth and hinders updates for existing users. Thus, reducing the binary size is important for application developers. Recent studies have shown the possibility of using link-time code size optimizations by re-invoking certain compiler optimizations on the linked intermediate representation of the program. However, such methods often incur significant build time overhead and require intrusive changes to the existing build pipeline. In this paper, we propose several novel optimization techniques that do not require significant customization to the build pipeline and reduce binary size with low build time overhead. As opposed to re-invoking the compiler during link time, we perform true linker optimization directly as optimization passes within the linker. This enables more optimization opportunities such as pre-compiled libraries that prior work often could not optimize. We evaluate our techniques on several commercial iOS applications including NewsFeedApp, ShortVideoApp, and CollaborationSuiteApp, each with hundreds of millions of daily active users. Our techniques on average achieve 18.4% binary size reduction across the three commercial applications without any user-perceivable performance degradations.
翻译:现代移动应用程序在二进制规模上迅速增长,限制了用户的增长,妨碍了现有用户的更新。 因此, 降低二进制规模对于应用程序开发者来说很重要。 最近的研究显示, 有可能通过在相连接的中间代表器上重新援引某些编译器优化程序, 从而使用连接时间代码尺寸优化。 但是, 这些方法往往需要大量建立时间管理, 并且需要对现有的建构管道进行侵扰性改变 。 在本文中, 我们建议了几种新型优化技术, 这些技术不需要对建构管道进行重大定制, 并且用低建设时间管理减少二进制规模 。 与在连接时间里重新启用编译器相比, 我们直接进行真正的连载器优化, 以作为链接器内部的优化通道 。 这样可以提供更多优化的机会, 比如, 之前的工作通常无法优化的编译前图书馆 。 我们评估了几个商业 iOS 应用程序的技术, 包括 NewFeedApp, ShortVideoApp 和 CompeterApp, pp, 每个每天有数以亿计的活跃用户。 我们的技术平均在三个商业应用程序中实现18. 4%的二进缩缩缩。