You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Speedup comes from two independent optimizations: (1) replacing qsufsort
with divsufsort for faster suffix array construction, and (2) an
LCP-aware binary search in search32/search64 that tracks the longest
common prefix at the current search interval boundaries (lcp_st, lcp_en)
and skips already-matched prefix bytes at each bisection step, reducing
redundant character comparisons during the scan phase.
Throughput (~17–22 Mi/s) is consistent across WinMerge and nodejs,
confirming O(n log n) scalability.
3.2 bspatch — Patch Application
Original bspatch-4.3 (single run via Python perf_counter)
The large zstd advantage comes from zstd decompression being ~10–20× faster than bzip2. The nodejs dataset (67 MB files, 4.1 MB patch) follows the same throughput ratios as WinMerge, confirming consistent scalability.
4. Summary
Dimension
Result
Format compatibility
Our bz2 packer is byte-level compatible with original bsdiff-4.3 in both directions ✅
zstd format
ZSTDDIFF is a custom extension; not interoperable with the original bsdiff toolchain
Diff speed
divsufsort vs. qsufsort gives ~2–2.6× speedup on real-world binaries
Patch speed (bz2)
Comparable to original (~1.1–1.3× faster on medium/large files)
Patch speed (zstd)
6.5–56× faster than original thanks to zstd's very fast decompression
Scalability
Throughput is consistent from 1 MB (putty) to 68 MB (nodejs), confirming linear scaling