BlazeDiff — a high-performance diff ecosystem for JavaScript applications. Originally built as a pixel-perfect image comparison library that's 1.5x faster than pixelmatch, BlazeDiff has evolved into a comprehensive suite of blazing-fast diff tools including image comparison, object diffing, web components, and React components for visualizing differences. Designed for visual testing, CI/CD pipelines, data validation, and any application requiring fast, accurate comparison operations.
BlazeDiff provides a complete ecosystem of high-performance diff tools:
- Image Diff: Pixel-perfect image comparison with 1.5x performance improvement over pixelmatch
- Object Diff: Lightning-fast structural object comparison with detailed change tracking
- Web Components: Framework-agnostic components for displaying diffs in web applications
- React Components: Purpose-built React components for seamless diff visualization
BlazeDiff's image comparison is 1.5x faster than pixelmatch while maintaining identical accuracy and output quality. The performance improvement comes from:
- Block-based algorithm: Dynamic-sized blocks with processing only for changed areas
- Early exit optimization: Immediate return for identical images (Native C++ in Node)
- 32-bit integer comparisons: CPU vectorization for faster pixel matching
- Multiple format support: PNG, JPEG, and WebP when using Sharp transformer
Expected | Actual | Diff |
---|---|---|
![]() |
![]() |
![]() |
100% API and Result Compatible: BlazeDiff is fully compatible with pixelmatch's API and produces identical results when using the YIQ color space flag.
BlazeDiff's object comparison provides blazing-fast structural diffing with comprehensive change detection:
- High-performance algorithm: Optimized for speed with intelligent key lookup strategies
- Detailed change tracking: Precise path tracking for nested object modifications
- Comprehensive type support: Handles primitives, objects, arrays, dates, regex, and circular references
- Memory efficient: Minimal overhead with consistent object shapes for V8 optimization
Original | Modified | Changes |
---|---|---|
|
|
|
Difference Types:
0
(CREATE) - Property or array element was added1
(REMOVE) - Property or array element was deleted2
(CHANGE) - Property or array element value was modified
BlazeDiff is available in multiple packages to suit different use cases:
- @blazediff/core - Core JavaScript library for pixel-perfect image comparison
- @blazediff/object - High-performance object diffing with detailed change tracking
- @blazediff/bin - CLI for image comparison with multiple format support
- @blazediff/react - React components for displaying diffs in your applications
- @blazediff/ui - Framework-agnostic web components for diff visualization
BlazeDiff delivers significant performance improvements across all components:
- Image Diff: ~50% faster than pixelmatch (up to 88% on identical images)
- Object Diff: ~30% faster than microdiff (up to 96% on identical arrays)
- CLI Tools: ~60% faster end-to-end performance with multi-format support
View Detailed Benchmarks - Complete performance data, test methodology, and hardware specifications.
Contributions are welcome! Please see the Contributing Guide for details.
MIT License - see LICENSE file for details.
- Image diffing built on the excellent pixelmatch algorithm
Built for high-performance difference detection across images and data structures