Faster Comparisons Across the Stack

We went on a performance tear. Honeydiff's SSIM calculation is now 5x faster thanks to integral images (summed area tables) and Rayon parallel processing – Full HD comparisons dropped from 239ms to 51ms. When screenshots are identical, we skip SSIM entirely, saving ~250M operations per comparison. On the CLI side, SDKs now pass an explicit type field so the server skips O(n) base64 detection, and we fixed a catastrophic regex backtracking bug that was causing stack overflows on large screenshots. The result: noticeably faster test runs, especially for content-heavy pages.

What’s new

  • ✓ SSIM 5x speedup using integral images for O(1) window statistics instead of O(121)
  • ✓ Rayon parallel processing spreads SSIM computation across all CPU cores
  • ✓ Identical images skip SSIM entirely – returns 1.0 immediately
  • ✓ CLI explicit type field eliminates O(n) base64 detection on server
  • ✓ Fixed catastrophic regex backtracking in base64 validation
  • ✓ Full HD (1920×1080) comparisons: 239ms → 51ms
  • ✓ All optimizations are mathematically identical – zero accuracy loss