AnyDiff v1.0.1
Changelog
All notable changes to AnyDiff will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[1.0.1] - 2026-08-18
π Mega-Diff & 1M+ Lines Memory Optimization
- Ultra-Low Memory Footprint (~250 MB on 1M+ LOC PRs):
- Validated on Bun's mega pull request (
41.3 MB diff,2,188 files,1,029,583 lines of code). - Active memory consumption reduced to ~250 MB RSS (compared to ~2.2 GB in Zed and standard diff viewers β ~9x less RAM).
- No memory leaks or runaway growth during extreme scrolling across 1,000,000+ lines.
- Validated on Bun's mega pull request (
β‘ 64 KB SIMD Streaming Git Diff Parser
- 18x Faster Time-To-First-File (TTFF):
- Subprocess streaming through
GitStreamReaderand 64 KBChunkLineSplitterdelivers the initial UI frame in ~400 ms whilegit diffcontinues reading in the background.
- Subprocess streaming through
- 5.5x Parser Throughput:
- Vectorized contiguous byte scanning processes >950,000 diff lines/sec (>38 MB/s).
π¦ Low-Level CPU Register & Cache Line Packing
-
8-Byte Coordinate Structures:
-
MultiBufferPoint&BufferPointcompressed from 16 bytes to 8 bytes (Int32storage with@inlinableIntaccessors). - Passes in a single 64-bit ARM64 CPU register (
x0), eliminating register spilling and stack allocation during high-frequency cursor/selection operations.
-
-
Virtual Range Index Packed to 33 Bytes:
-
DisplayMap.ExcerptSliceRangecompressed from 96 bytes to 33 bytes (stride: 36 bytes) withExcerptFlags: OptionSet. - Fits inside half of a single 64-byte L1 CPU Cache Line, significantly accelerating
$O(\log N)$ binary search coordinate translations.
-
π§ Intra-Line WordDiffEngine (L1-Cache LCS & Zero Heap Allocations)
- 40 KB L1-Cache LCS Matrix:
- LCS dynamic programming matrix converted to a flat 1D stack-allocated
[UInt8]buffer (withUnsafeTemporaryAllocation). - Working memory shrunk from 323 KB to 40.4 KB (an 8x reduction), ensuring 100% data locality inside the Apple Silicon L1 Data Cache.
- LCS dynamic programming matrix converted to a flat 1D stack-allocated
- Zero-Allocation UTF-8 Pointer Tokenization:
- Replaced
Array(text)with direct contiguous UTF-8 pointer iteration (withContiguousStorageIfAvailable), eliminating heap allocations per tokenized code line.
- Replaced
ποΈ Smooth 120 FPS ProMotion Viewport Virtualization
- Virtual Line Synthesis:
- Removed flat line arrays in favor of on-demand viewport synthesis from
ExcerptSliceRangeprefix sums. - Achieved simulated 465+ FPS during rapid scrolling across 1,000,000+ line diffs with instantaneous frame times.
- Removed flat line arrays in favor of on-demand viewport synthesis from
π§ͺ Benchmarks & Tests
- Expanded automated test suite to 56 passing unit & integration tests.
- Added dedicated
MemoryPackingBenchmarkTestssuite for continuous memory layout and micro-benchmark verification.
[1.0.0] - 2026-08-16
π Initial Release
- MultiBuffer architecture for multi-file Git diffs and PR reviews.
- Native AppKit & CoreText high-performance rendering engine.
- Safe in-place editing with disk auto-save and file change tracking.
- Context folding, excerpt expansion, and sticky headers.
- GitHub Pull Request, commit, and compare URL loading.
- Inline review comments and tokenized syntax highlighting.