Skip to content

AnyDiff v1.0.1

Choose a tag to compare

@github-actions github-actions released this 18 Aug 09:15
· 99 commits to main since this release

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.

⚑ 64 KB SIMD Streaming Git Diff Parser

  • 18x Faster Time-To-First-File (TTFF):
    • Subprocess streaming through GitStreamReader and 64 KB ChunkLineSplitter delivers the initial UI frame in ~400 ms while git diff continues reading in the background.
  • 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 & BufferPoint compressed from 16 bytes to 8 bytes (Int32 storage with @inlinable Int accessors).
    • 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.ExcerptSliceRange compressed from 96 bytes to 33 bytes (stride: 36 bytes) with ExcerptFlags: 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.
  • Zero-Allocation UTF-8 Pointer Tokenization:
    • Replaced Array(text) with direct contiguous UTF-8 pointer iteration (withContiguousStorageIfAvailable), eliminating heap allocations per tokenized code line.

🏎️ Smooth 120 FPS ProMotion Viewport Virtualization

  • Virtual Line Synthesis:
    • Removed flat line arrays in favor of on-demand viewport synthesis from ExcerptSliceRange prefix sums.
    • Achieved simulated 465+ FPS during rapid scrolling across 1,000,000+ line diffs with instantaneous frame times.

πŸ§ͺ Benchmarks & Tests

  • Expanded automated test suite to 56 passing unit & integration tests.
  • Added dedicated MemoryPackingBenchmarkTests suite 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.