v3.2.0
⚡ BOOST PERFORMANCE OF getObjectDiff & getListDiff
-
Rewrote
getObjectDiffandgetListDifffor maximum performance.
Due to aggressive optimizations, the code is less readable, but the performance gain justifies the tradeoff. -
Added a benchmark comparing Superdiff with its main competitors.
-
Updated several dev dependencies.
📊 BENCHMARK
Environment: Node.js 24.12.0 (LTS) • MacBook Pro M2 (2023, Sequoia 15.1) • 16GB RAM.
Method: Warm up runs, then each script is executed 20 times, and we keep the median time. To minimize garbage collection and cross‑benchmark interference, all scenarios are run individually. All benchmark scripts are included so you can reproduce the results locally.
List diff
| Scenario | Superdiff | arr-diff | deep-diff |
|---|---|---|---|
| 10k items array | 1.84 ms | 32.95 ms | 4.74 ms |
| 100k items array | 17.43 ms | 3363.15 ms | 50.36 ms |
Object diff
| Scenario | Superdiff | deep-object-diff | deep-diff |
|---|---|---|---|
| 10k flat object keys | 2.27 ms | 2.44 ms | 39.37 ms |
| 100k flat object keys | 29.23 ms | 31.86 ms | 3784.50 ms |
| 100k nested nodes | 4.25 ms | 9.67 ms | 16.51 ms |
👉 Despite providing a full structural diff with a richer output, Superdiff is the fastest. It also scales linearly, even with deeply nested data.