facebook 的 proguard vs redex - 优缺点

proguard vs redex by facebook - pros and cons

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

要不从马口中取? redex on github

以防万一 link 将来中断:

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.