gpt4 book ai didi

android - facebook 的 proguard vs redex - 优缺点

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:36:27 26 4
gpt4 key购买 nike

我没有看到 facebook 给出任何关于为什么 redex 比使用 proguard 更好的统计数据。谁能列出优缺点?显然,redex 应该能让 Android 运行得更快。有一篇差文http://www.i-programmer.info/news/80-java/9034-facebooks-redex-makes-android-more-efficient.html

最佳答案

从马口中获取如何? redex on github

以防万一将来链接断开:

How does this compare to ProGuard?

ReDex is conceptually similar to ProGuard, in that both optimize bytecode. ReDex, however, optimizes .dex bytecode, while ProGuard optimizes .class bytecode before it is lowered to .dex. Operating on .dex is sometimes an advantage: you can consider the number of virtual registers used by a method that is an inlining candidate, and you can control the layout of classes within a dex file. But ProGuard has many capabilities that ReDex does not (for example, ReDex will not remove unused method parameters, which ProGuard does).

In our opinion, comparing ReDex and ProGuard is a bit apples-and-oranges, since we have focused on optimizations that add value on top of ProGuard. We use both tools to optimize the Facebook app. Our reported performance and size improvements (about 25% on both dex size and cold start time) are based on using ReDex on an app already optimized with ProGuard. We have no plans to measure performance without ProGuard.

关于android - facebook 的 proguard vs redex - 优缺点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33333909/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com