bsdiff| google-diff-match-patch | metro-bundle 文件差异分析工具性能比对

复制代码
## 项目目的

源于在做 React Native 包拆分的需求时,比较 bsdiff 和 google-diff-match-patch 在生成差量文件上的性能差异。

- bsdiff (http://www.daemonology.net/bsdiff/)
- google-diff-match-patch (https://github.com/bystep15/google-diff-match-patch)
- metro-bundle(https://facebook.github.io/metro/)

## 实验数据

- Hello World 工程中的 jsbundle 对比

| 工具名称                    | bsdiff        | google-diff-match-patch | metro-bundle  |
| --------------------------- | ------------- | ----------------------- | ------------- |
| Common 包                   | 764,797 bytes | 764,797 bytes           | 764,797 bytes |
| HelloWorld 完整包           | 767,338 bytes | 767,338 bytes           | 767,338 bytes |
| HelloWorld 业务补丁 (patch) | 1,324 bytes   | 42,891 bytes            | 2,783 bytes   |
| 拆分时间 (diff time)        | 1,042 ms      | 2,410 ms                | -             |
| 合并时间 (patch time)       | 32 ms         | 258 ms                  | -             |
相关推荐
孟陬7 分钟前
国外技术周刊 #1:Paul Graham 重新分享最受欢迎的文章《创作者的品味》、本周被划线最多 YouTube《如何在 19 分钟内学会 AI》、为何我不
java·前端·后端
想用offer打牌10 分钟前
一站式了解四种限流算法
java·后端·go
华仔啊40 分钟前
Java 开发千万别给布尔变量加 is 前缀!很容易背锅
java
也些宝2 小时前
Java单例模式:饿汉、懒汉、DCL三种实现及最佳实践
java
Nyarlathotep01132 小时前
SpringBoot Starter的用法以及原理
java·spring boot
wuwen52 小时前
WebFlux + Lettuce Reactive 中 SkyWalking 链路上下文丢失的修复实践
java
SimonKing2 小时前
GitHub 10万星的OpenCode,正在悄悄改变我们的工作流
java·后端·程序员
Seven973 小时前
虚拟线程深度解析:轻量并发编程的未来趋势
java
雨中飘荡的记忆13 小时前
ElasticJob分布式调度从入门到实战
java·后端