Skip to content

Commit 77d23a9

Browse files
committed
docs(benchmark): update benchmark doc
1 parent 5b88f40 commit 77d23a9

File tree

15 files changed

+40
-40
lines changed

15 files changed

+40
-40
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,23 @@ Mutative is up to 6x faster than naive handcrafted reducer for updating immutabl
108108

109109
> Mutative passed all of Immer's test cases.
110110
111-
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]
111+
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]
112112

113113
![Benchmark](benchmark.jpg)
114114

115115
```
116-
Naive handcrafted reducer - No Freeze x 4,476 ops/sec ±0.38% (96 runs sampled)
117-
Mutative - No Freeze x 6,058 ops/sec ±0.91% (90 runs sampled)
118-
Immer - No Freeze x 5.80 ops/sec ±0.34% (19 runs sampled)
116+
Naive handcrafted reducer - No Freeze x 4,450 ops/sec ±0.36% (96 runs sampled)
117+
Mutative - No Freeze x 6,137 ops/sec ±1.15% (89 runs sampled)
118+
Immer - No Freeze x 5.27 ops/sec ±0.65% (18 runs sampled)
119119
120-
Mutative - Freeze x 971 ops/sec ±1.07% (98 runs sampled)
121-
Immer - Freeze x 380 ops/sec ±0.61% (94 runs sampled)
120+
Mutative - Freeze x 960 ops/sec ±1.42% (95 runs sampled)
121+
Immer - Freeze x 378 ops/sec ±0.70% (93 runs sampled)
122122
123-
Mutative - Patches and No Freeze x 967 ops/sec ±0.94% (96 runs sampled)
124-
Immer - Patches and No Freeze x 5.83 ops/sec ±0.17% (19 runs sampled)
123+
Mutative - Patches and No Freeze x 960 ops/sec ±1.32% (97 runs sampled)
124+
Immer - Patches and No Freeze x 5.27 ops/sec ±0.69% (18 runs sampled)
125125
126-
Mutative - Patches and Freeze x 502 ops/sec ±0.94% (96 runs sampled)
127-
Immer - Patches and Freeze x 278 ops/sec ±0.73% (90 runs sampled)
126+
Mutative - Patches and Freeze x 493 ops/sec ±1.40% (94 runs sampled)
127+
Immer - Patches and Freeze x 275 ops/sec ±0.62% (89 runs sampled)
128128
129129
The fastest method is Mutative - No Freeze
130130
```

benchmark-array.jpg

908 Bytes
Loading

benchmark-class.jpg

-4.4 KB
Loading

benchmark-object.jpg

651 Bytes
Loading

benchmark.jpg

-23 Bytes
Loading
908 Bytes
Loading
651 Bytes
Loading
-23 Bytes
Loading

website/blog/releases/1.0/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,23 @@ const state = create(baseState, (draft) => {
8181

8282
> Mutative passed all of Immer's test cases.
8383
84-
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]
84+
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]
8585

8686
![Benchmark](img/benchmark.jpg)
8787

8888
```
89-
Naive handcrafted reducer - No Freeze x 4,476 ops/sec ±0.38% (96 runs sampled)
90-
Mutative - No Freeze x 6,058 ops/sec ±0.91% (90 runs sampled)
91-
Immer - No Freeze x 5.80 ops/sec ±0.34% (19 runs sampled)
89+
Naive handcrafted reducer - No Freeze x 4,450 ops/sec ±0.36% (96 runs sampled)
90+
Mutative - No Freeze x 6,137 ops/sec ±1.15% (89 runs sampled)
91+
Immer - No Freeze x 5.27 ops/sec ±0.65% (18 runs sampled)
9292
93-
Mutative - Freeze x 971 ops/sec ±1.07% (98 runs sampled)
94-
Immer - Freeze x 380 ops/sec ±0.61% (94 runs sampled)
93+
Mutative - Freeze x 960 ops/sec ±1.42% (95 runs sampled)
94+
Immer - Freeze x 378 ops/sec ±0.70% (93 runs sampled)
9595
96-
Mutative - Patches and No Freeze x 967 ops/sec ±0.94% (96 runs sampled)
97-
Immer - Patches and No Freeze x 5.83 ops/sec ±0.17% (19 runs sampled)
96+
Mutative - Patches and No Freeze x 960 ops/sec ±1.32% (97 runs sampled)
97+
Immer - Patches and No Freeze x 5.27 ops/sec ±0.69% (18 runs sampled)
9898
99-
Mutative - Patches and Freeze x 502 ops/sec ±0.94% (96 runs sampled)
100-
Immer - Patches and Freeze x 278 ops/sec ±0.73% (90 runs sampled)
99+
Mutative - Patches and Freeze x 493 ops/sec ±1.40% (94 runs sampled)
100+
Immer - Patches and Freeze x 275 ops/sec ±0.62% (89 runs sampled)
101101
102102
The fastest method is Mutative - No Freeze
103103
```

website/docs/extra-topics/comparison-with-immer.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ Mutative has fewer bugs such as accidental draft escapes than Immer, [view detai
2525

2626
> Mutative passed all of Immer's test cases.
2727
28-
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]
28+
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]
2929

3030
![Benchmark](img/benchmark.jpg)
3131

3232
```
33-
Naive handcrafted reducer - No Freeze x 4,476 ops/sec ±0.38% (96 runs sampled)
34-
Mutative - No Freeze x 6,058 ops/sec ±0.91% (90 runs sampled)
35-
Immer - No Freeze x 5.80 ops/sec ±0.34% (19 runs sampled)
33+
Naive handcrafted reducer - No Freeze x 4,450 ops/sec ±0.36% (96 runs sampled)
34+
Mutative - No Freeze x 6,137 ops/sec ±1.15% (89 runs sampled)
35+
Immer - No Freeze x 5.27 ops/sec ±0.65% (18 runs sampled)
3636
37-
Mutative - Freeze x 971 ops/sec ±1.07% (98 runs sampled)
38-
Immer - Freeze x 380 ops/sec ±0.61% (94 runs sampled)
37+
Mutative - Freeze x 960 ops/sec ±1.42% (95 runs sampled)
38+
Immer - Freeze x 378 ops/sec ±0.70% (93 runs sampled)
3939
40-
Mutative - Patches and No Freeze x 967 ops/sec ±0.94% (96 runs sampled)
41-
Immer - Patches and No Freeze x 5.83 ops/sec ±0.17% (19 runs sampled)
40+
Mutative - Patches and No Freeze x 960 ops/sec ±1.32% (97 runs sampled)
41+
Immer - Patches and No Freeze x 5.27 ops/sec ±0.69% (18 runs sampled)
4242
43-
Mutative - Patches and Freeze x 502 ops/sec ±0.94% (96 runs sampled)
44-
Immer - Patches and Freeze x 278 ops/sec ±0.73% (90 runs sampled)
43+
Mutative - Patches and Freeze x 493 ops/sec ±1.40% (94 runs sampled)
44+
Immer - Patches and Freeze x 275 ops/sec ±0.62% (89 runs sampled)
4545
4646
The fastest method is Mutative - No Freeze
4747
```

0 commit comments

Comments
 (0)