diff --git a/README.md b/README.md index 17626f99..a755e552 100644 --- a/README.md +++ b/README.md @@ -108,23 +108,23 @@ Mutative is up to 6x faster than naive handcrafted reducer for updating immutabl > Mutative passed all of Immer's test cases. -Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)). [Mutative v1.0.3 vs Immer v10.0.3] +Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)). [Mutative v1.0.4 vs Immer v10.0.4] ![Benchmark](benchmark.jpg) ``` -Naive handcrafted reducer - No Freeze x 4,476 ops/sec ±0.38% (96 runs sampled) -Mutative - No Freeze x 6,058 ops/sec ±0.91% (90 runs sampled) -Immer - No Freeze x 5.80 ops/sec ±0.34% (19 runs sampled) +Naive handcrafted reducer - No Freeze x 4,450 ops/sec ±0.36% (96 runs sampled) +Mutative - No Freeze x 6,137 ops/sec ±1.15% (89 runs sampled) +Immer - No Freeze x 5.27 ops/sec ±0.65% (18 runs sampled) -Mutative - Freeze x 971 ops/sec ±1.07% (98 runs sampled) -Immer - Freeze x 380 ops/sec ±0.61% (94 runs sampled) +Mutative - Freeze x 960 ops/sec ±1.42% (95 runs sampled) +Immer - Freeze x 378 ops/sec ±0.70% (93 runs sampled) -Mutative - Patches and No Freeze x 967 ops/sec ±0.94% (96 runs sampled) -Immer - Patches and No Freeze x 5.83 ops/sec ±0.17% (19 runs sampled) +Mutative - Patches and No Freeze x 960 ops/sec ±1.32% (97 runs sampled) +Immer - Patches and No Freeze x 5.27 ops/sec ±0.69% (18 runs sampled) -Mutative - Patches and Freeze x 502 ops/sec ±0.94% (96 runs sampled) -Immer - Patches and Freeze x 278 ops/sec ±0.73% (90 runs sampled) +Mutative - Patches and Freeze x 493 ops/sec ±1.40% (94 runs sampled) +Immer - Patches and Freeze x 275 ops/sec ±0.62% (89 runs sampled) The fastest method is Mutative - No Freeze ``` diff --git a/benchmark-array.jpg b/benchmark-array.jpg index fc13adc8..5d64cad8 100644 Binary files a/benchmark-array.jpg and b/benchmark-array.jpg differ diff --git a/benchmark-class.jpg b/benchmark-class.jpg index 5b442877..4a82c8b1 100644 Binary files a/benchmark-class.jpg and b/benchmark-class.jpg differ diff --git a/benchmark-object.jpg b/benchmark-object.jpg index 5467e624..bc248ce9 100644 Binary files a/benchmark-object.jpg and b/benchmark-object.jpg differ diff --git a/benchmark.jpg b/benchmark.jpg index 04c04830..39cb3029 100644 Binary files a/benchmark.jpg and b/benchmark.jpg differ diff --git a/website/blog/releases/1.0/img/benchmark-array.jpg b/website/blog/releases/1.0/img/benchmark-array.jpg index fc13adc8..5d64cad8 100644 Binary files a/website/blog/releases/1.0/img/benchmark-array.jpg and b/website/blog/releases/1.0/img/benchmark-array.jpg differ diff --git a/website/blog/releases/1.0/img/benchmark-object.jpg b/website/blog/releases/1.0/img/benchmark-object.jpg index 5467e624..bc248ce9 100644 Binary files a/website/blog/releases/1.0/img/benchmark-object.jpg and b/website/blog/releases/1.0/img/benchmark-object.jpg differ diff --git a/website/blog/releases/1.0/img/benchmark.jpg b/website/blog/releases/1.0/img/benchmark.jpg index 04c04830..39cb3029 100644 Binary files a/website/blog/releases/1.0/img/benchmark.jpg and b/website/blog/releases/1.0/img/benchmark.jpg differ diff --git a/website/blog/releases/1.0/index.md b/website/blog/releases/1.0/index.md index 1861dd25..d54c9c04 100644 --- a/website/blog/releases/1.0/index.md +++ b/website/blog/releases/1.0/index.md @@ -81,23 +81,23 @@ const state = create(baseState, (draft) => { > Mutative passed all of Immer's test cases. -Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)). [Mutative v1.0.3 vs Immer v10.0.3] +Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)). [Mutative v1.0.4 vs Immer v10.0.4] ![Benchmark](img/benchmark.jpg) ``` -Naive handcrafted reducer - No Freeze x 4,476 ops/sec ±0.38% (96 runs sampled) -Mutative - No Freeze x 6,058 ops/sec ±0.91% (90 runs sampled) -Immer - No Freeze x 5.80 ops/sec ±0.34% (19 runs sampled) +Naive handcrafted reducer - No Freeze x 4,450 ops/sec ±0.36% (96 runs sampled) +Mutative - No Freeze x 6,137 ops/sec ±1.15% (89 runs sampled) +Immer - No Freeze x 5.27 ops/sec ±0.65% (18 runs sampled) -Mutative - Freeze x 971 ops/sec ±1.07% (98 runs sampled) -Immer - Freeze x 380 ops/sec ±0.61% (94 runs sampled) +Mutative - Freeze x 960 ops/sec ±1.42% (95 runs sampled) +Immer - Freeze x 378 ops/sec ±0.70% (93 runs sampled) -Mutative - Patches and No Freeze x 967 ops/sec ±0.94% (96 runs sampled) -Immer - Patches and No Freeze x 5.83 ops/sec ±0.17% (19 runs sampled) +Mutative - Patches and No Freeze x 960 ops/sec ±1.32% (97 runs sampled) +Immer - Patches and No Freeze x 5.27 ops/sec ±0.69% (18 runs sampled) -Mutative - Patches and Freeze x 502 ops/sec ±0.94% (96 runs sampled) -Immer - Patches and Freeze x 278 ops/sec ±0.73% (90 runs sampled) +Mutative - Patches and Freeze x 493 ops/sec ±1.40% (94 runs sampled) +Immer - Patches and Freeze x 275 ops/sec ±0.62% (89 runs sampled) The fastest method is Mutative - No Freeze ``` diff --git a/website/docs/extra-topics/comparison-with-immer.md b/website/docs/extra-topics/comparison-with-immer.md index 1c369455..e312cac3 100644 --- a/website/docs/extra-topics/comparison-with-immer.md +++ b/website/docs/extra-topics/comparison-with-immer.md @@ -25,23 +25,23 @@ Mutative has fewer bugs such as accidental draft escapes than Immer, [view detai > Mutative passed all of Immer's test cases. -Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)). [Mutative v1.0.3 vs Immer v10.0.3] +Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)). [Mutative v1.0.4 vs Immer v10.0.4] ![Benchmark](img/benchmark.jpg) ``` -Naive handcrafted reducer - No Freeze x 4,476 ops/sec ±0.38% (96 runs sampled) -Mutative - No Freeze x 6,058 ops/sec ±0.91% (90 runs sampled) -Immer - No Freeze x 5.80 ops/sec ±0.34% (19 runs sampled) +Naive handcrafted reducer - No Freeze x 4,450 ops/sec ±0.36% (96 runs sampled) +Mutative - No Freeze x 6,137 ops/sec ±1.15% (89 runs sampled) +Immer - No Freeze x 5.27 ops/sec ±0.65% (18 runs sampled) -Mutative - Freeze x 971 ops/sec ±1.07% (98 runs sampled) -Immer - Freeze x 380 ops/sec ±0.61% (94 runs sampled) +Mutative - Freeze x 960 ops/sec ±1.42% (95 runs sampled) +Immer - Freeze x 378 ops/sec ±0.70% (93 runs sampled) -Mutative - Patches and No Freeze x 967 ops/sec ±0.94% (96 runs sampled) -Immer - Patches and No Freeze x 5.83 ops/sec ±0.17% (19 runs sampled) +Mutative - Patches and No Freeze x 960 ops/sec ±1.32% (97 runs sampled) +Immer - Patches and No Freeze x 5.27 ops/sec ±0.69% (18 runs sampled) -Mutative - Patches and Freeze x 502 ops/sec ±0.94% (96 runs sampled) -Immer - Patches and Freeze x 278 ops/sec ±0.73% (90 runs sampled) +Mutative - Patches and Freeze x 493 ops/sec ±1.40% (94 runs sampled) +Immer - Patches and Freeze x 275 ops/sec ±0.62% (89 runs sampled) The fastest method is Mutative - No Freeze ``` diff --git a/website/docs/extra-topics/img/benchmark.jpg b/website/docs/extra-topics/img/benchmark.jpg index 992815d4..39cb3029 100644 Binary files a/website/docs/extra-topics/img/benchmark.jpg and b/website/docs/extra-topics/img/benchmark.jpg differ diff --git a/website/docs/getting-started/img/benchmark-array.jpg b/website/docs/getting-started/img/benchmark-array.jpg index fc13adc8..5d64cad8 100644 Binary files a/website/docs/getting-started/img/benchmark-array.jpg and b/website/docs/getting-started/img/benchmark-array.jpg differ diff --git a/website/docs/getting-started/img/benchmark-object.jpg b/website/docs/getting-started/img/benchmark-object.jpg index 5467e624..bc248ce9 100644 Binary files a/website/docs/getting-started/img/benchmark-object.jpg and b/website/docs/getting-started/img/benchmark-object.jpg differ diff --git a/website/docs/getting-started/img/benchmark.jpg b/website/docs/getting-started/img/benchmark.jpg index 04c04830..39cb3029 100644 Binary files a/website/docs/getting-started/img/benchmark.jpg and b/website/docs/getting-started/img/benchmark.jpg differ diff --git a/website/docs/getting-started/performance.md b/website/docs/getting-started/performance.md index ad24b98d..16bde7f8 100644 --- a/website/docs/getting-started/performance.md +++ b/website/docs/getting-started/performance.md @@ -69,23 +69,23 @@ const state = create(baseState, (draft) => { > Mutative passed all of Immer's test cases. -Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)). [Mutative v1.0.3 vs Immer v10.0.3] +Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)). [Mutative v1.0.4 vs Immer v10.0.4] ![Benchmark](img/benchmark.jpg) ``` -Naive handcrafted reducer - No Freeze x 4,476 ops/sec ±0.38% (96 runs sampled) -Mutative - No Freeze x 6,058 ops/sec ±0.91% (90 runs sampled) -Immer - No Freeze x 5.80 ops/sec ±0.34% (19 runs sampled) +Naive handcrafted reducer - No Freeze x 4,450 ops/sec ±0.36% (96 runs sampled) +Mutative - No Freeze x 6,137 ops/sec ±1.15% (89 runs sampled) +Immer - No Freeze x 5.27 ops/sec ±0.65% (18 runs sampled) -Mutative - Freeze x 971 ops/sec ±1.07% (98 runs sampled) -Immer - Freeze x 380 ops/sec ±0.61% (94 runs sampled) +Mutative - Freeze x 960 ops/sec ±1.42% (95 runs sampled) +Immer - Freeze x 378 ops/sec ±0.70% (93 runs sampled) -Mutative - Patches and No Freeze x 967 ops/sec ±0.94% (96 runs sampled) -Immer - Patches and No Freeze x 5.83 ops/sec ±0.17% (19 runs sampled) +Mutative - Patches and No Freeze x 960 ops/sec ±1.32% (97 runs sampled) +Immer - Patches and No Freeze x 5.27 ops/sec ±0.69% (18 runs sampled) -Mutative - Patches and Freeze x 502 ops/sec ±0.94% (96 runs sampled) -Immer - Patches and Freeze x 278 ops/sec ±0.73% (90 runs sampled) +Mutative - Patches and Freeze x 493 ops/sec ±1.40% (94 runs sampled) +Immer - Patches and Freeze x 275 ops/sec ±0.62% (89 runs sampled) The fastest method is Mutative - No Freeze ```