ASIC:概念验证型二进制优化器减小体积,更多优化即将到来

1作者: Forgret9 个月前
我开发了一个名为 ASIC 的 PoC(概念验证)二进制优化器,它用专用指令替换常见的指令序列。 即使只实现了 19 个已识别模式中的 2 个,它也使测试二进制文件减少了 0.02%。 想象一下,一旦涵盖所有模式,潜力会有多大。 亮点: * 直接在二进制文件上运行,无需更改源代码。 * 与现有的优化(如 O2/O3、Oz 和 strip)兼容。 * 跨架构潜力,不限于 ARM64 或 ELF。 * 可以补充打包工具(如 UPX),而不会降低执行速度。 这还处于早期阶段,但这个概念证明了指令级模式替换是可行的。下一步:实现所有热点模式以进行有意义的优化。 欢迎任何从事二进制转换或运行时指令仿真工作的人提出想法。
查看原文
I’ve built a PoC binary optimizer called ASIC that replaces common instruction sequences with specialized instructions.<p>Even with only 2 patterns implemented out of 19 identified, it reduced a test binary by 0.02%. Imagine the potential once all patterns are covered.<p>Highlights:<p>Works directly on binaries, no source changes needed.<p>Compatible with existing optimizations like O2&#x2F;O3, Oz, and strip.<p>Cross-architecture potential, not limited to ARM64 or ELF.<p>Can complement packing tools (like UPX) without slowing execution.<p>This is early-stage, but the concept proves instruction-level pattern replacement is feasible. Next step: implement all hot patterns for meaningful optimization.<p>Would love thoughts from anyone who’s worked with binary transformations or runtime instruction emulation.